]> source.dussan.org Git - aspectj.git/commitdiff
Make BCEL classpath utility recognise Java 16-19, fixing many tests
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Sun, 21 Mar 2021 13:08:15 +0000 (20:08 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Sun, 21 Mar 2021 13:08:15 +0000 (20:08 +0700)
This is a follow-up commit on @07af5d41:
Inside org.aspectj.apache.bcel.util.ClassPath.getClassPath(), some JVM
version matching occurs which previously did not include Java 16 (I also
added 17-19 to the regex matcher). This fixes test errors like:

java.lang.ClassCastException:
  class org.aspectj.weaver.MissingResolvedTypeWithKnownSignature
  cannot be cast to class
  org.aspectj.weaver.ReferenceType
  (org.aspectj.weaver.MissingResolvedTypeWithKnownSignature and
  org.aspectj.weaver.ReferenceType are in unnamed module
  of loader 'app')

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java

index 7d3d18de662cc1a0b79c89856df8ed74da5bd451..29f8f6d6d96c08ff4c3d2ac77b01217e99c437cf 100644 (file)
@@ -227,7 +227,7 @@ public class ClassPath implements Serializable {
                }
 
                // 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).*")) {
+               if (vm_version.matches("^(9|10|11|12|13|14|15|16|17|18|19).*")) {
                        buf.insert(0, File.pathSeparatorChar);
                        buf.insert(0, System.getProperty("java.home") + File.separator + "lib" + File.separator + JRT_FS);
                }