Skip to content

Commit 4b6f06a

Browse files
hansonrhansonr
authored andcommitted
new SwingJS-site.zip
1 parent 1e93f7c commit 4b6f06a

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed
920 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20190306180548
1+
20190307200127
920 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20190306180548
1+
20190307200127
920 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/srcjs/swingjs2.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13941,8 +13941,19 @@ Clazz.exceptionOf = function(e, clazz) {
1394113941
|| clazz == NullPointerException && _isNPEExceptionPredicate(e));
1394213942
};
1394313943

13944-
Clazz.forName = function(name, initialize, loader) {
13945-
return Clazz._4Name(name, null, null, false, initialize);
13944+
Clazz.forName = function(name, initialize, loader, isQuiet) {
13945+
// we need to consider loading a class from the path of the calling class.
13946+
var cl = null;
13947+
if (loader) {
13948+
try {
13949+
isQuiet = true;
13950+
var className = loader.baseClass.getName$(); // set in java.lang.Class.getClassLoader$()
13951+
var i = className.lastIndexOf(".");
13952+
var name1 = className.substring(0, i + 1) + name;
13953+
cl = Clazz._4Name(name1, null, null, false, initialize, true);
13954+
} catch (e) {}
13955+
}
13956+
return cl || Clazz._4Name(name, null, null, false, initialize, isQuiet);
1394613957
}
1394713958

1394813959
Clazz.getClass = function(cl, methodList) {
@@ -16125,7 +16136,7 @@ var evaluate = function(file, js) {
1612516136
}
1612616137
}
1612716138

16128-
Clazz._4Name = function(clazzName, applet, state, asClazz, initialize) {
16139+
Clazz._4Name = function(clazzName, applet, state, asClazz, initialize, isQuiet) {
1612916140
if (clazzName.indexOf("[") == 0)
1613016141
return getArrayClass(clazzName);
1613116142
if (clazzName.indexOf(".") < 0)
@@ -16162,6 +16173,8 @@ Clazz._4Name = function(clazzName, applet, state, asClazz, initialize) {
1616216173
}
1616316174
var cl = evalType(clazzName);
1616416175
if (!cl){
16176+
if (isQuiet)
16177+
return null;
1616516178
alert(clazzName + " could not be loaded");
1616616179
doDebugger();
1616716180
}

0 commit comments

Comments
 (0)