integration tests: Fix JDK version handling

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885553 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2021-01-16 11:36:45 +00:00
parent 5e110d7216
commit 2a19c0161d
1 changed files with 2 additions and 9 deletions

View File

@ -88,15 +88,8 @@ import org.opentest4j.AssertionFailedError;
@Execution(ExecutionMode.CONCURRENT)
public class TestAllFiles {
private static final File ROOT_DIR = new File("test-data");
private static final int jreVersion;
static {
String version = System.getProperty("java.version");
String major = version.startsWith("1.")
? version.substring(2, 3)
: version.substring(0, version.indexOf("."));
jreVersion = Integer.parseInt(major);
}
private static final int jreVersion =
Integer.parseInt(System.getProperty("java.version").replaceAll("^(?:1\\.)?(\\d+).*", "$1"));
public static final String[] SCAN_EXCLUDES = {
"**/.svn/**",