This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit 1974edfdcd1fe30a4010852b51b59b15ac35c72a Author: Gary D. Gregory <[email protected]> AuthorDate: Sun Jul 20 14:33:34 2025 -0400 org.apache.bcel.util.ClassPath.addJdkModules(String, List<String>) now reads the system property "jdk.module.path" instead of "java.modules.path"; see https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/System.html#jdk.module.path --- src/changes/changes.xml | 3 ++- src/main/java/org/apache/bcel/util/ClassPath.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 43f2110d..05cc036e 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -67,7 +67,8 @@ The <action> type attribute can be add,update,fix,remove. <action type="fix" dev="ggregory" due-to="Gary Gregory">ClassPath.getResources(String) can use an ArrayList instead of a Vector.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix SpotBugs [ERROR] Medium: Operation on the "created" shared variable in "ConstantUtf8" class is not atomic [org.apache.bcel.classfile.ConstantUtf8] At ConstantUtf8.java:[line 119] AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix SpotBugs [ERROR] Medium: Operation on the "considered" shared variable in "ConstantUtf8" class is not atomic [org.apache.bcel.classfile.ConstantUtf8] At ConstantUtf8.java:[line 137] AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE.</action> - <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix SpotBugs [ERROR] Medium: Operation on the "skipped" shared variable in "ConstantUtf8" class is not atomic [org.apache.bcel.classfile.ConstantUtf8] At ConstantUtf8.java:[line 134] AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix SpotBugs [ERROR] Medium: Operation on the "skipped" shared variable in "ConstantUtf8" class is not atomic [org.apache.bcel.classfile.ConstantUtf8] At ConstantUtf8.java:[line 134] AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">org.apache.bcel.util.ClassPath.addJdkModules(String, List<String>) now reads the system property "jdk.module.path" instead of "java.modules.path"; see https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/System.html#jdk.module.path.</action> <!-- ADD --> <action type="update" dev="ggregory" due-to="Gary Gregory">Add Const.MAJOR_25.</action> <action type="update" dev="ggregory" due-to="Gary Gregory">Add Const.MINOR_25.</action> diff --git a/src/main/java/org/apache/bcel/util/ClassPath.java b/src/main/java/org/apache/bcel/util/ClassPath.java index b56cc409..328b5aba 100644 --- a/src/main/java/org/apache/bcel/util/ClassPath.java +++ b/src/main/java/org/apache/bcel/util/ClassPath.java @@ -443,7 +443,7 @@ public class ClassPath implements Closeable { public static final ClassPath SYSTEM_CLASS_PATH = new ClassPath(getClassPath()); private static void addJdkModules(final String javaHome, final List<String> list) { - String modulesPath = System.getProperty("java.modules.path"); + String modulesPath = SystemProperties.getJdkModulePath(); if (modulesPath == null || modulesPath.trim().isEmpty()) { // Default to looking in JAVA_HOME/jmods modulesPath = javaHome + File.separator + "jmods";
