fixded the version mess in the test framework.

This commit is contained in:
Reinier Zwitserloot committed 2017-03-07 01:12:24 +01:00
1 parent eb91f71e83
commit 8bfbd7fa84
1 file changed
-18
@@ -62,8 +62,6 @@ public abstract class AbstractRunTests {
try {
sourceDirectives = LombokTestSource.readDirectives(file);
if (sourceDirectives.isIgnore()) return null;
if (!sourceDirectives.versionWithinLimit(params.getVersion())) return null;
if (!sourceDirectives.versionWithinLimit(getClasspathVersion())) return null;
if (!sourceDirectives.versionWithinLimit(version)) return null;
if (!sourceDirectives.runOnPlatform(platform)) return null;
} catch (AssertionError ae) {
@@ -101,22 +99,6 @@ public abstract class AbstractRunTests {
};
}
private static int getClasspathVersion() {
try {
Class.forName("java.lang.AutoCloseable");
} catch (ClassNotFoundException e) {
return 6;
}
try {
Class.forName("java.util.stream.Stream");
} catch (ClassNotFoundException e) {
return 7;
}
return 8;
}
protected abstract boolean transformCode(Collection<CompilerMessage> messages, StringWriter result, File file, String encoding, Map<String, String> formatPreferences) throws Throwable;
protected String readFile(File file) throws IOException {