Skip to content

Commit b4c924c

Browse files
author
zhourenjian
committed
Fixing bugs and other small improvements
1 parent 6cbe772 commit b4c924c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ JavaObject.prototype.toString = function () {
9595
if (this.__CLASS_NAME__ != null) {
9696
return "[" + this.__CLASS_NAME__ + " object]";
9797
} else {
98-
return this.to$tring ();
98+
return this.to$tring.apply (this, arguments);
9999
}
100100
};
101101

@@ -514,7 +514,7 @@ Clazz.getInheritedLevel = function (clazzTarget, clazzBase) {
514514
/* public */
515515
Clazz.instanceOf = function (obj, clazz) {
516516
if (obj == null) {
517-
return clazz == undefined; // should usually false
517+
return false; // return clazz == undefined; // should usually false
518518
}
519519
if (clazz == null) {
520520
return false;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ String.prototype.lastIndexOf = function (s, last) {
400400
}
401401
};
402402

403+
String.prototype.contains = function (s) {
404+
return this.indexOf (s) != -1;
405+
};
406+
403407
String.prototype.intern = function () {
404408
return this.valueOf ();
405409
};

sources/net.sf.j2s.java.core/src/java/package.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ window["java.package.callback"] = function () {
3838
"$.XHRCallbackSWTAdapter",
3939

4040
"$.SimpleSerializable",
41+
"$.ISimpleCacheable",
4142
"$.SimpleFilter",
4243
"$.SimpleRPCRunnable",
4344
"$.ISimpleRequestInfoBinding",

0 commit comments

Comments
 (0)