Skip to content

Commit dc5404d

Browse files
author
zhourenjian
committed
Fixing class loader bug of failed to load some classes under some scenarios
1 parent b4c924c commit dc5404d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,11 +1728,11 @@ $_L(["$wt.widgets.Widget","$wt.graphics.Drawable"],"$wt.widgets.Control",
17281728
if (node.status < ClazzNode.STATUS_DECLARED) {
17291729
var decl = node.declaration;
17301730
if (decl != null) {
1731-
if (decl.executed == false) {
1731+
if (!decl.executed) {
17321732
decl ();
17331733
decl.executed = true;
1734-
} else {
1735-
decl ();
1734+
//} else {
1735+
// decl ();
17361736
}
17371737
}
17381738
node.status = ClazzNode.STATUS_DECLARED;
@@ -2514,7 +2514,9 @@ ClazzLoader.loadClass = function (name, optionalsLoaded, forced, async) {
25142514
} else {
25152515
optionalsLoaded ();
25162516
}
2517-
} // else ... should be called later
2517+
} else { // should be called later
2518+
window.setTimeout (optionalsLoaded, 25);
2519+
}
25182520
}
25192521

25202522
};

0 commit comments

Comments
 (0)