MavenDistribution (@NotNull String path, @NotNull String label) { File file = new File(path); if (!isValidMavenHome(file)) return null; WslPath wslPath = WslPath.parseWindowsUncPath(file.getAbsolutePath()); if (wslPath == null) { return new LocalMavenDistribution(file.toPath(), label); } else { return new WslMavenDistribution(wslPath.getDistribution(), wslPath.getLinuxPath(), label); } }