Message11986

Author stefan.richthofer
Recipients jamesmudd, jeff.allen, stefan.richthofer
Date 2018-05-16.19:17:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526498226.92.0.682650639539.issue2672@psf.upfronthosting.co.za>
In-reply-to
Content
We should definitely fix it. It is invalid behavior, can cause arbitrary issues, unforeseeable damage, etc. It must be fixed.

That said, an easy fix should be to replace
number = Integer.toString(-value);
by
number = Long.toString(-((long) value));

This impacts performance of non-edge-case calls. I don't think that format_d is a performance critical function, but - for what it's worth -
we can do it like

number = value == Integer.MIN_VALUE ? "2147483648" : Integer.toString(-value);
History
Date User Action Args
2018-05-16 19:17:06stefan.richthofersetmessageid: <1526498226.92.0.682650639539.issue2672@psf.upfronthosting.co.za>
2018-05-16 19:17:06stefan.richthofersetrecipients: + stefan.richthofer, jeff.allen, jamesmudd
2018-05-16 19:17:06stefan.richthoferlinkissue2672 messages
2018-05-16 19:17:06stefan.richthofercreate