File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/org/apache/commons/lang3 Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1616 */
1717package org .apache .commons .lang3 ;
1818
19+ import java .util .regex .Pattern ;
20+
1921import org .apache .commons .lang3 .math .NumberUtils ;
2022
2123/**
@@ -198,9 +200,9 @@ public enum JavaVersion {
198200 JAVA_RECENT (maxVersion (), Float .toString (maxVersion ()));
199201
200202 /**
201- * The regex to split version strings .
203+ * The regex to split version pattern .
202204 */
203- private static final String VERSION_SPLIT_REGEX = "\\ ." ;
205+ private static final Pattern VERSION_SPLIT_PATTERN = Pattern . compile ( "\\ ." ) ;
204206
205207 /**
206208 * Transforms the given string with a Java version number to the
@@ -305,7 +307,7 @@ private static float maxVersion() {
305307 }
306308
307309 static String [] split (final String value ) {
308- return value .split (VERSION_SPLIT_REGEX );
310+ return VERSION_SPLIT_PATTERN .split (value );
309311 }
310312
311313 /**
You can’t perform that action at this time.
0 commit comments