Skip to content

Commit a690231

Browse files
author
zhourenjian
committed
Fixed bug that ClassLoader does not load optional classes if they are already being loaded but not loaded completely.
1 parent ae67e0c commit a690231

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sources/net.sf.j2s.java.core/src/java/lang/ClassLoader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,18 +2129,22 @@ ClazzLoader.load = function (musts, clazz, optionals, declaration) {
21292129
if (name == null || name.length == 0) {
21302130
continue;
21312131
}
2132+
/*
21322133
if (ClazzLoader.isClassDefined (name)
21332134
|| ClazzLoader.isClassExcluded (name)) {
21342135
continue;
21352136
}
2137+
//*/
21362138
isOptionalsOK = false;
21372139
var n = ClazzLoader.findClass (name);
21382140
if (n == null) {
21392141
n = new ClazzNode ();
21402142
n.name = optionals[i];
21412143
n.status = ClazzNode.STATUS_KNOWN;
21422144
}
2143-
ClazzLoader.addChildClassNode (node, n, -1);
2145+
if (n.status != ClazzNode.STATUS_OPTIONALS_LOADED) {
2146+
ClazzLoader.addChildClassNode (node, n, -1);
2147+
}
21442148
}
21452149
}
21462150
};

0 commit comments

Comments
 (0)