Skip to content

Commit

Permalink
Fixing situations where all eclipse tests would fail.
Browse files Browse the repository at this point in the history
This is another one of those: Wait.. this does not work and never has? bug. Fixed, at any rate. If _every_ eclipse test throws NPE, this fix is for you.
  • Loading branch information
rzwitserloot committed Jan 14, 2022
1 parent 2685d37 commit daee44d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/core/src/lombok/RunTestsViaEcj.java
Expand Up @@ -239,11 +239,6 @@ static CompilationUnit toDomAst(CompilationUnitDeclaration cud, final char[] sou

private FileSystem createFileSystem(File file, int minVersion) {
List<String> classpath = new ArrayList<String>();
for (Iterator<String> i = classpath.iterator(); i.hasNext();) {
if (FileSystem.getClasspath(i.next(), "UTF-8", null) == null) {
i.remove();
}
}
if (new File("bin/main").exists()) classpath.add("bin/main");
classpath.add("dist/lombok.jar");
classpath.add("build/teststubs");
Expand All @@ -255,6 +250,11 @@ private FileSystem createFileSystem(File file, int minVersion) {
if (!fn.substring(fn.length() - 4).toLowerCase().equals(".jar")) continue;
classpath.add("lib/test/" + fn);
}
for (Iterator<String> i = classpath.iterator(); i.hasNext();) {
if (FileSystem.getClasspath(i.next(), "UTF-8", null) == null) {
i.remove();
}
}
return new FileSystem(classpath.toArray(new String[0]), new String[] {file.getAbsolutePath()}, "UTF-8");
}

Expand Down

0 comments on commit daee44d

Please sign in to comment.