aboutsummaryrefslogtreecommitdiff
path: root/test/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/src')
-rw-r--r--test/core/src/lombok/DirectoryRunner.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/core/src/lombok/DirectoryRunner.java b/test/core/src/lombok/DirectoryRunner.java
index a3b4de00..855db023 100644
--- a/test/core/src/lombok/DirectoryRunner.java
+++ b/test/core/src/lombok/DirectoryRunner.java
@@ -32,25 +32,18 @@ import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import lombok.javac.Javac;
+
import org.junit.runner.Description;
import org.junit.runner.Runner;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunNotifier;
-import com.sun.tools.javac.main.JavaCompiler;
-
public class DirectoryRunner extends Runner {
public enum Compiler {
DELOMBOK {
@Override public int getVersion() {
- Matcher m = VERSION_PARSER.matcher(JavaCompiler.version());
- if (m.matches()) {
- int major = Integer.parseInt(m.group(1));
- int minor = Integer.parseInt(m.group(2));
- if (major == 1) return minor;
- }
-
- return 6;
+ return Javac.getJavaCompilerVersion();
}
},
JAVAC {
@@ -64,7 +57,6 @@ public class DirectoryRunner extends Runner {
}
};
- private static final Pattern VERSION_PARSER = Pattern.compile("^(\\d+)\\.(\\d+).*$");
public abstract int getVersion();
}