diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-01-16 11:36:45 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-01-16 11:36:45 +0000 |
commit | 2a19c0161d0397e72de5974458f1e8884984bb17 (patch) | |
tree | 0e3807a973b9b0054603620721ec8a97d58354b3 /src/integrationtest | |
parent | 5e110d72167461ee5842b56a347d8e159b88c22c (diff) | |
download | poi-2a19c0161d0397e72de5974458f1e8884984bb17.tar.gz poi-2a19c0161d0397e72de5974458f1e8884984bb17.zip |
integration tests: Fix JDK version handling
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/integrationtest')
-rw-r--r-- | src/integrationtest/org/apache/poi/stress/TestAllFiles.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java index 347559330f..a065309fc6 100644 --- a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java @@ -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/**", |