Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: Release 1.2, Release 1.3, Release 1.4
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
In general Clojure's number types can be read prefixed with either a +
or - and this seems to work correctly for reading integers and floats.
In the case of ratios however things break down when ratios are
prefixed with a +.
The ratio pattern in LispReader.java does match on ratios starting
with both + and - but matchNumber fails on ratios prefixed with +
because it ends up calling "new BigInteger(m.group(1))" and it turns
out the constructor for BigInteger has no problems with negative
numbers but it doesn't like numbers prefixed by a +.
Attachments
Activity
Cosmin Stejerean
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Patch | Code and Test [ 10002 ] | |
| Attachment | 0001-added-tests-for-reading-ratios-and-fixed-reading-of-.patch [ 10797 ] |
Andy Fingerhut
made changes -
| Attachment | clj-923-reading-ratios-prefixed-by-plus-patch.txt [ 10962 ] |
Andy Fingerhut
made changes -
| Attachment | clj-923-reading-ratios-prefixed-by-plus-patch2.txt [ 11005 ] |
Andy Fingerhut
made changes -
| Attachment | clj-923-reading-ratios-prefixed-by-plus-patch.txt [ 10962 ] |
Cosmin Stejerean
made changes -
| Attachment | 0001-added-tests-for-reading-ratios-and-fixed-reading-of-.patch [ 10797 ] |
Rich Hickey
made changes -
| Approval | Vetted [ 10003 ] | |
| Fix Version/s | Release 1.5 [ 10150 ] |
Aaron Bedra
made changes -
| Approval | Vetted [ 10003 ] | Screened [ 10004 ] |
Rich Hickey
made changes -
| Approval | Screened [ 10004 ] | Ok [ 10007 ] |
Stuart Halloway
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |