Skip to content

Commit 1974edf

Browse files
committed
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
1 parent e34d7b2 commit 1974edf

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/changes/changes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ The <action> type attribute can be add,update,fix,remove.
6767
<action type="fix" dev="ggregory" due-to="Gary Gregory">ClassPath.getResources(String) can use an ArrayList instead of a Vector.</action>
6868
<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>
6969
<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>
70-
<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>
70+
<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>
71+
<action type="fix" dev="ggregory" due-to="Gary Gregory">org.apache.bcel.util.ClassPath.addJdkModules(String, List&lt;String&gt;) 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>
7172
<!-- ADD -->
7273
<action type="update" dev="ggregory" due-to="Gary Gregory">Add Const.MAJOR_25.</action>
7374
<action type="update" dev="ggregory" due-to="Gary Gregory">Add Const.MINOR_25.</action>

src/main/java/org/apache/bcel/util/ClassPath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ protected String toEntryName(final String name, final String suffix) {
443443
public static final ClassPath SYSTEM_CLASS_PATH = new ClassPath(getClassPath());
444444

445445
private static void addJdkModules(final String javaHome, final List<String> list) {
446-
String modulesPath = System.getProperty("java.modules.path");
446+
String modulesPath = SystemProperties.getJdkModulePath();
447447
if (modulesPath == null || modulesPath.trim().isEmpty()) {
448448
// Default to looking in JAVA_HOME/jmods
449449
modulesPath = javaHome + File.separator + "jmods";

0 commit comments

Comments
 (0)