Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-07-11 Thread Mike Duigou
Some comments: - The NumberFormatException.forInputString for some CharSequence is probably misleading since it doesn't consider the begin-end range which was in effect for the parsing. Rather than extracting the substring just for the error message perhaps include the index at which the error

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-07-11 Thread Claes Redestad
Thank you for looking at this, Mike! New webrev: http://cr.openjdk.java.net/~redestad/8041972/webrev.12 On 2014-07-12 00:55, Mike Duigou wrote: Some comments: - The NumberFormatException.forInputString for some CharSequence is probably misleading since it doesn't consider the begin-end

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-27 Thread Paul Sandoz
On Jun 26, 2014, at 6:53 PM, Claes Redestad claes.redes...@oracle.com wrote: On 06/25/2014 06:43 PM, Paul Sandoz wrote: On Jun 19, 2014, at 7:39 PM, Claes Redestad claes.redes...@oracle.com wrote: Hi, an updated webrev with reworked, public methods is available here:

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-27 Thread Claes Redestad
Hi, updated webrev:http://cr.openjdk.java.net/~redestad/8041972/webrev.11 Changes: - Remove use of IllegalArgumentException in favor of IndexOutOfBoundsException/NumberFormatException, making the new methods behave in line with how String.substring wouldat some edge cases:

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-26 Thread Claes Redestad
On 06/25/2014 06:43 PM, Paul Sandoz wrote: On Jun 19, 2014, at 7:39 PM, Claes Redestad claes.redes...@oracle.com wrote: Hi, an updated webrev with reworked, public methods is available here: http://cr.openjdk.java.net/~redestad/8041972/webrev.8/ Reviews are yet again appreciated! I think if

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-25 Thread Paul Sandoz
On Jun 19, 2014, at 7:39 PM, Claes Redestad claes.redes...@oracle.com wrote: Hi, an updated webrev with reworked, public methods is available here: http://cr.openjdk.java.net/~redestad/8041972/webrev.8/ Reviews are yet again appreciated! I think if (s == null) or

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-19 Thread Claes Redestad
Hi, an updated webrev with reworked, public methods is available here: http://cr.openjdk.java.net/~redestad/8041972/webrev.8/ Reviews are yet again appreciated! /Claes On 06/17/2014 05:43 PM, Claes Redestad wrote: Ok, I'm working on improving code and comments based on feedback. I'll split

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-17 Thread roger riggs
Yes, that looks more consistent with the current versions. Though you want to see these for 8u, the preferred pattern is to make the changes in 9 and then backport the result (in this case adding the shared secrets aspect). Roger On 6/16/2014 4:13 PM, Claes Redestad wrote: ... The

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-17 Thread Claes Redestad
Ok, I'm working on improving code and comments based on feedback. I'll split the SharedSecrets part out, make the methods public and post a new webrev soon. /Claes On 06/17/2014 04:21 PM, roger riggs wrote: Yes, that looks more consistent with the current versions. Though you want to see

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-16 Thread roger riggs
Hi Claes, The descriptions of the new methods should take the same form as the coresponding existing methods. The rationalization about intermediary objects is not useful in describing the behavior of the method and should be omitted. /** * Parses the string argument starting at fromIndex

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-16 Thread Claes Redestad
On 2014-06-16 21:50, roger riggs wrote: Hi Claes, The descriptions of the new methods should take the same form as the coresponding existing methods. The rationalization about intermediary objects is not useful in describing the behavior of the method and should be omitted. Point taken!

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-16 Thread Joe Darcy
Hello Claes, Instead of saying * Extend upon parseFoo(String, int) in the javadoc of the new methods paired with an * @see parseFoo(String, int) please use an {@link parseFoo} instead. Thanks, -Joe On 06/15/2014 03:22 PM, Claes Redestad wrote: I've updated the patch to use

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-15 Thread Remi Forax
On 06/15/2014 12:36 AM, Claes Redestad wrote: Hi, please review this patch to add offset based variants of Integer.parseInt/parseUnsignedInt, Long.parseLong/parseUnsignedLong and expose them through JavaLangAccess along with formatUnsignedInt/-Long. This is proposed to enable a number of

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-15 Thread Claes Redestad
On 2014-06-15 13:48, Remi Forax wrote: On 06/15/2014 12:36 AM, Claes Redestad wrote: Hi, please review this patch to add offset based variants of Integer.parseInt/parseUnsignedInt, Long.parseLong/parseUnsignedLong and expose them through JavaLangAccess along with formatUnsignedInt/-Long.

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-15 Thread Claes Redestad
I've updated the patch to use CharSequence in favor of String for all new methods, as well as ensuring all new methods are package private (for now): http://cr.openjdk.java.net/~redestad/8041972/webrev.2/ Reviews appreciated! /Claes On 2014-06-15 14:29, Claes Redestad wrote: On 2014-06-15

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-15 Thread Remi Forax
On 06/16/2014 12:22 AM, Claes Redestad wrote: I've updated the patch to use CharSequence in favor of String for all new methods, as well as ensuring all new methods are package private (for now): http://cr.openjdk.java.net/~redestad/8041972/webrev.2/ Reviews appreciated! /Claes Thanks,

Re: RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-15 Thread Remi Forax
On 06/15/2014 02:29 PM, Claes Redestad wrote: On 2014-06-15 13:48, Remi Forax wrote: On 06/15/2014 12:36 AM, Claes Redestad wrote: Hi, please review this patch to add offset based variants of Integer.parseInt/parseUnsignedInt, Long.parseLong/parseUnsignedLong and expose them through

RFR [9] 8041972: Add improved parse/format methods for Long/Integer

2014-06-14 Thread Claes Redestad
Hi, please review this patch to add offset based variants of Integer.parseInt/parseUnsignedInt, Long.parseLong/parseUnsignedLong and expose them through JavaLangAccess along with formatUnsignedInt/-Long. This is proposed to enable a number of minor optimizations, starting with