Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 1.0-beta-6
-
Component/s: None
-
Labels:None
-
Environment:Windows XP
Description
Comparisons with Integer.MAX_VALUE work correctly; comparisons with Integer.MIN_VALUE do not. Consider:
println "8 < MAX_VALUE direct: " + (8 < Integer.MAX_VALUE)
hi = Integer.MAX_VALUE
println "8 < MAX_VALUE indirect: " + (8 < hi)
println "8 > MIN_VALUE direct: " + (8 > Integer.MIN_VALUE)
hi = Integer.MIN_VALUE
println "8 > MIN_VALUE indirect: " + (8 > hi)
The output is:
8 < MAX_VALUE direct: true
8 < MAX_VALUE indirect: true
8 > MIN_VALUE direct: false
8 > MIN_VALUE indirect: false
(Note: there's nothing special about the value '8'... ![]()
Fixed comparison code in NumberMath subclasses