Skip to content

Commit 270eae3

Browse files
author
zhourenjian
committed
Fixed a bug that #main method is called twice
1 parent d4895a6 commit 270eae3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,14 +2256,13 @@ ClazzLoader.loadClass = function (name, optionalsLoaded, forced, async) {
22562256
if (n != null) {
22572257
if (n.optionalsLoaded == null) {
22582258
n.optionalsLoaded = optionalsLoaded;
2259-
} else {
2260-
var oldOL = n.optionalsLoaded;
2259+
} else if (optionalsLoaded != n.optionalsLoaded) {
22612260
n.optionalsLoaded = (function (oF, nF) {
22622261
return function () {
22632262
oF();
22642263
nF();
22652264
};
2266-
}) (oldOL, optionalsLoaded);
2265+
}) (n.optionalsLoaded, optionalsLoaded);
22672266
}
22682267
}
22692268
}
@@ -2309,7 +2308,7 @@ $w$ = ClazzLoader.loadJ2SApp = function (clazz, args, loaded) {
23092308
};
23102309
}) (clazzStr, agmts);
23112310
} else {
2312-
afterLoaded = loaded(clazzStr, agmts);
2311+
afterLoaded = loaded (clazzStr, agmts);
23132312
}
23142313
ClazzLoader.loadClass (clazzStr, afterLoaded);
23152314
};

0 commit comments

Comments
 (0)