aboutsummaryrefslogtreecommitdiff
path: root/test/core/src/lombok/RunTestsViaEcj.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2022-01-14 02:27:26 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2022-01-14 02:32:46 +0100
commitdaee44decfc46a4da46ae5eb83c5c9acaba0831d (patch)
treef40023cb584e78e8b6b88f030701fcef9cd9294b /test/core/src/lombok/RunTestsViaEcj.java
parent2685d37748bab76669e19a9952a3c5cbd951162a (diff)
downloadlombok-daee44decfc46a4da46ae5eb83c5c9acaba0831d.tar.gz
lombok-daee44decfc46a4da46ae5eb83c5c9acaba0831d.tar.bz2
lombok-daee44decfc46a4da46ae5eb83c5c9acaba0831d.zip
Fixing situations where all eclipse tests would fail.
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.
Diffstat (limited to 'test/core/src/lombok/RunTestsViaEcj.java')
-rw-r--r--test/core/src/lombok/RunTestsViaEcj.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/core/src/lombok/RunTestsViaEcj.java b/test/core/src/lombok/RunTestsViaEcj.java
index 6137de49..60a6e92a 100644
--- a/test/core/src/lombok/RunTestsViaEcj.java
+++ b/test/core/src/lombok/RunTestsViaEcj.java
@@ -239,11 +239,6 @@ public class RunTestsViaEcj extends AbstractRunTests {
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");
@@ -255,6 +250,11 @@ public class RunTestsViaEcj extends AbstractRunTests {
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");
}