Skip to content

Commit 764e49d

Browse files
committed
Use the appropriate File constructor
This avoids issues with directory separators. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 70ee242 commit 764e49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private MavenProject getMavenProject(final BuildEnvironment env,
262262
path = path.substring(0, path.length() - mainClass.length() - 5);
263263
if (path.replace(File.separatorChar, '/').endsWith("/src/main/java/")) {
264264
path = path.substring(0, path.length() - "src/main/java/".length());
265-
final File pom = new File(path + "pom.xml");
265+
final File pom = new File(path, "pom.xml");
266266
if (pom.exists()) return env.parse(pom, null);
267267
}
268268
final File rootDirectory = file.getParentFile();

0 commit comments

Comments
 (0)