Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.6
-
Component/s: groovy-jdk
-
Labels:None
-
Number of attachments :
Description
The ObjectRange.size() method has optimisations for BigDecimal, Integer and Long, but not BigInteger
https://github.com/groovy/groovy-core/blob/master/src/main/groovy/lang/ObjectRange.java#L262
This means that calling:
(1G..2147483647G).size()
Takes ages
Could we change:
} else if (from instanceof BigInteger || to instanceof BigInteger) {
to
} else if (from instanceof BigDecimal || to instanceof BigDecimal || from instanceof BigInteger || to instanceof BigInteger ) {
To catch this?
Activity
Pascal Schumacher
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Component/s | groovy-jdk [ 10750 ] |
Pascal Schumacher
made changes -
| Assignee | Tim Yates [ tim_yates ] |
Tim Yates
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.1.1 [ 18990 ] | |
| Fix Version/s | 1.8.9 [ 18778 ] | |
| Fix Version/s | 2.0.7 [ 19028 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Can somebody answer Tims question? Thanks
!