RFR(S): 8055032: Improve numerical parsing in java.net and sun.net
mike.duigou at oracle.com
Mon Aug 18 21:12:52 UTC 2014
On Aug 14 2014, at 06:39 , Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 14/08/2014 14:23, Claes Redestad wrote:
>> How about methods only taking beginIndex? Integer.parseInt("x: 10000000", 3, 10)? I guess these could to be dropped
>> to avoid ambiguity and instead allow for variations where radix can be left out.
>> I think there are two alternatives to the current implementation:
>> - only keep parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
> That's my preference
Looking at the examples I agree that providing only this one method is probably the least error prone option.
> and core-libs-dev would be the place to move the discussion.
>> - optional radix: parseInt(CharSequence s, int beginIndex, int endIndex), parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
>> (Should this discussion be moved to core-libs-dev?)
More information about the core-libs-dev