You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/01/16 11:36:45 UTC
svn commit: r1885553 -
/poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
Author: kiwiwings
Date: Sat Jan 16 11:36:45 2021
New Revision: 1885553
URL: http://svn.apache.org/viewvc?rev=1885553&view=rev
Log:
integration tests: Fix JDK version handling
Modified:
poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
Modified: poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java?rev=1885553&r1=1885552&r2=1885553&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java (original)
+++ poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java Sat Jan 16 11:36:45 2021
@@ -88,15 +88,8 @@ import org.opentest4j.AssertionFailedErr
@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/**",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org