Message11993
Ok I don't mind the one liner either your right its faster. Style wise I would prefer an if e.g
if(value == Integer.MIN_VALUE) {
number = Long.toString(-((long)value));
} else {
number = Integer.toString(value);
}
Just had a quick look and I think this bug is present in other places too. Long should be ok as that will go though IntegerFormatter.format_d(BigInteger) but the bug is present in the other int formatting i.e to hex, octal, binary, char. These need tests and fixing to.
Actually no I think the nicest solution might be to call the BigInteger equivalent methods if value == Integer.MIN_VALUE. What do you think of this idea?
I will work on a pull request to fix all the cases I know of. |
|
Date |
User |
Action |
Args |
2018-05-17 20:17:17 | jamesmudd | set | messageid: <1526588237.1.0.682650639539.issue2672@psf.upfronthosting.co.za> |
2018-05-17 20:17:17 | jamesmudd | set | recipients:
+ jamesmudd, jeff.allen, stefan.richthofer |
2018-05-17 20:17:17 | jamesmudd | link | issue2672 messages |
2018-05-17 20:17:16 | jamesmudd | create | |
|