Skip to content

Commit 3714aec

Browse files
committed
String.equalsIgnoreCase$S not equalsIgnoreCase
1 parent 977b0e7 commit 3714aec

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

sources/net.sf.j2s.core/test/dev/js/j2sSwingJS.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4718,7 +4718,7 @@ return this.valueOf();
47184718
});
47194719
m$(Boolean,"$valueOf",
47204720
function(b){
4721-
return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE);
4721+
return((typeof b == "string"? "true".equalsIgnoreCase$S(b) : b)?Boolean.TRUE:Boolean.FALSE);
47224722
}, 1);
47234723

47244724
m$(Boolean,"toString",
@@ -4761,14 +4761,14 @@ return(b.value==this.value?0:(this.value?1:-1));
47614761
});
47624762
m$(Boolean,"toBoolean",
47634763
function(name){
4764-
return(typeof name == "string" ? name.equalsIgnoreCase("true") : !!name);
4764+
return(typeof name == "string" ? name.equalsIgnoreCase$S("true") : !!name);
47654765
}, 1);
47664766

47674767
// the need is to have new Boolean(string), but that won't work with native Boolean
47684768
// so instead we have to do a lexical switch from "new Boolean" to "Boolean.from"
47694769
m$(Boolean,"from",
47704770
function(name){
4771-
return Clazz.$new(Boolean.construct, [typeof name == "string" ? name.equalsIgnoreCase("true") : !!name]);
4771+
return Clazz.$new(Boolean.construct, [typeof name == "string" ? name.equalsIgnoreCase$S("true") : !!name]);
47724772
}, 1);
47734773

47744774
Boolean.TRUE=Boolean.prototype.TRUE=Clazz.$new(Boolean.construct, [true]);
@@ -5149,12 +5149,7 @@ sp.endsWith$S=function(suffix){
51495149
return sn(this, suffix,this.length-suffix.length);
51505150
};
51515151

5152-
5153-
sp.equals=function(anObject){
5154-
return this.valueOf()==anObject;
5155-
};
5156-
5157-
sp.equals$O=function(anObject){
5152+
sp.equals=sp.equals$O = function(anObject){
51585153
return this.valueOf()==anObject;
51595154
};
51605155

0 commit comments

Comments
 (0)