Skip to content

Commit a324bdd

Browse files
author
soheil_h_y
committed
1. Returning valueof in doubleValue, floatValue and ...
1 parent f47cfc1 commit a324bdd

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/Number.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ return Math.round (this);
3030

3131
Clazz.defineMethod (Number, "floatValue",
3232
function () {
33-
return this;
33+
return this.valueOf();
3434
});
3535

3636
Clazz.defineMethod (Number, "doubleValue",
3737
function () {
38-
return this;
38+
return this.valueOf();
3939
});
4040

4141
Clazz.defineMethod (Number, "hashCode",
4242
function () {
4343
return this.valueOf ();
4444
});
45-
});
45+
});

0 commit comments

Comments
 (0)