Skip to content

Commit 8c326ed

Browse files
author
zhourenjian
committed
1 parent 8748601 commit 8c326ed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • sources/net.sf.j2s.java.core/src/java/lang

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ return Boolean.toBoolean (s);
3030
}, "~S");
3131
Clazz.defineMethod (Boolean, "booleanValue",
3232
function () {
33-
return this.value;
33+
return this.valueOf ();
3434
});
3535
Boolean.$valueOf = Clazz.defineMethod (Boolean, "$valueOf",
3636
function (b) {
@@ -55,7 +55,7 @@ return this.valueOf () ? 1231 : 1237;
5555
Clazz.overrideMethod (Boolean, "equals",
5656
function (obj) {
5757
if (Clazz.instanceOf (obj, Boolean)) {
58-
return this.value == (obj).booleanValue ();
58+
return this.valueOf () == (obj).booleanValue ();
5959
}return false;
6060
}, "~O");
6161
Boolean.getBoolean = Clazz.defineMethod (Boolean, "getBoolean",
@@ -74,7 +74,7 @@ return result;
7474
}, "~S");
7575
Clazz.overrideMethod (Boolean, "compareTo",
7676
function (b) {
77-
return (b.value == this.value ? 0 : (this.value ? 1 : -1));
77+
return (b.value == this.valueOf () ? 0 : (this.valueOf () ? 1 : -1));
7878
}, "Boolean");
7979
Boolean.toBoolean = Clazz.defineMethod (Boolean, "toBoolean",
8080
($fz = function (name) {

0 commit comments

Comments
 (0)