Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0-JSR-4
-
None
-
None
Description
The following should be consistent, but it is not:
assert 1 == "1" //fails
assert 11 == "11" //works
assert "1" > 1 //works
assert "11" > 11 //fails
The above issues seem to be due to a bug in Invoker.asNumber() and Invoker.compareTo(). They treat String with a length of 1 differently. For example, asNumber converts Strings of length 1 to Integer, and everything else to BigDecimal (yikes!).