From daee44decfc46a4da46ae5eb83c5c9acaba0831d Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 14 Jan 2022 02:27:26 +0100 Subject: 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. --- test/core/src/lombok/RunTestsViaEcj.java | 10 +++++----- 1 file 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 classpath = new ArrayList(); - for (Iterator 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 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"); } -- cgit