diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-03-29 08:38:57 +0200 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-24 13:10:46 +0700 |
commit | ba520d6cfab3b968bd020d1e965e18aa72819813 (patch) | |
tree | a42442adc870370af053a75e31b219582480a688 | |
parent | ec5e94cc188bfb54ff96b8312548176c3c02c80a (diff) | |
download | aspectj-ba520d6cfab3b968bd020d1e965e18aa72819813.tar.gz aspectj-ba520d6cfab3b968bd020d1e965e18aa72819813.zip |
Improve Java 9+ version matching in ClassPath.getClassPath
On the short term, this fixes the failing weaver tests on JDK 20. On the
long term, the improved matching heuristics should make it unnecessary
to update the regex again.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r-- | bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java index bb9e3c3f5..4189fab5b 100644 --- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java +++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java @@ -226,8 +226,8 @@ public class ClassPath implements Serializable { buf.append(File.pathSeparatorChar); } - // On Java9 the sun.boot.class.path won't be set. System classes accessible through JRT filesystem - if (vm_version.matches("^(9|10|11|12|13|14|15|16|17|18|19).*")) { + // On Java 9+, sun.boot.class.path won't be set. System classes are accessible through JRT filesystem. + if (vm_version.matches("^(9|[1-9][0-9]+).*")) { buf.insert(0, File.pathSeparatorChar); buf.insert(0, System.getProperty("java.home") + File.separator + "lib" + File.separator + JRT_FS); } |