On Tue, 2 Mar 2021 18:07:24 GMT, Stuart Marks wrote:
>> test/jdk/jdk/internal/util/ArraysSupport/NewLength.java line 100:
>>
>>> 98: int r = ArraysSupport.newLength(old, min, pref);
>>> 99: fail("expected OutOfMemoryError, got normal return value of
>>> " + r);
>>> 100:
On Tue, 2 Mar 2021 15:05:51 GMT, Pavel Rappo wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Update copyright year.
>
> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 579:
>
>> 577: /**
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
> 1. I fixed a problem with overflow checking. In the
On Tue, 2 Mar 2021 06:29:07 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Tue, 2 Mar 2021 06:29:07 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
> 1. I fixed a problem with overflow checking. In the
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
> 1. I fixed a problem with overflow checking. In the
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
> 1. I fixed a problem with overflow checking. In the
On Sun, 24 Jan 2021 20:14:04 GMT, Martin Buchholz wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> fix typo, clarify asserts disabled, test prefGrowth==0
>
> Marked as reviewed by martin (Reviewer).
The new docs
On Tue, 8 Dec 2020 06:14:35 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Fri, 4 Dec 2020 17:31:20 GMT, Stuart Marks wrote:
>> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 654:
>>
>>> 652: return SOFT_MAX_ARRAY_LENGTH;
>>> 653: } else {
>>> 654: return minLength;
>>
>> Isn't this last `else if... then..
On Tue, 8 Dec 2020 06:14:35 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Tue, 8 Dec 2020 06:14:35 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Wed, 9 Dec 2020 00:32:37 GMT, Paul Sandoz wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> fix typo, clarify asserts disabled, test prefGrowth==0
>
>
On Tue, 8 Dec 2020 06:14:35 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Wed, 9 Dec 2020 00:32:44 GMT, Paul Sandoz wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> fix typo, clarify asserts disabled, test prefGrowth==0
>
> Marked as reviewed by psandoz (Reviewer).
@Martin-Buchholz
On Tue, 8 Dec 2020 06:14:35 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Tue, 8 Dec 2020 06:14:35 GMT, Stuart Marks wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Tue, 8 Dec 2020 00:48:55 GMT, Stuart Marks wrote:
>> The algorithm can be well defined for minGrowth and prefGrowth == 0 without
>> extra checks or exceptions with a careful look at the inequality checks.
>> For example, as currently coded, if both are zero, it returns
>>
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
> 1. I fixed a problem with overflow checking. In the
On Mon, 7 Dec 2020 16:05:11 GMT, Roger Riggs wrote:
>> The origin of this code is in collections like ArrayList that have an
>> existing array (hence oldLength >= 0) and that need it to grow (hence
>> minGrowth > 0). Those were the prevailing assumptions in the code from which
>> this was
On Sat, 5 Dec 2020 02:37:55 GMT, Stuart Marks wrote:
>> Is there a reason the code would not naturally work when either min or
>> preferred is zero?
>> Why are their preconditions? What do they allow?
>> These methods are used in enough places that a slip in any of the clients
>> would be
On Fri, 4 Dec 2020 16:02:33 GMT, Roger Riggs wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Fri, 4 Dec 2020 19:13:45 GMT, Roger Riggs wrote:
>> The preconditions aren't checked, because this is an internal method, and
>> the code size is minimized in order to help inlining. That's also why
>> `hugeLength` is a separate method. (I guess I could add comments to this
>> effect.)
On Fri, 4 Dec 2020 17:49:25 GMT, Stuart Marks wrote:
>> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 640:
>>
>>> 638: int prefLength = oldLength + Math.max(minGrowth, prefGrowth);
>>> // might overflow
>>> 639: if (0 < prefLength && prefLength <=
On Fri, 4 Dec 2020 06:50:14 GMT, Stuart Marks wrote:
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
On Fri, 4 Dec 2020 15:53:01 GMT, Roger Riggs wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Fri, 4 Dec 2020 15:47:51 GMT, Roger Riggs wrote:
>> This rewrites the doc of ArraysSupport.newLength, adds detail to the
>> exception message, and adds a test. In addition to some renaming and a bit
>> of refactoring of the actual code, I also made two changes of substance to
>> the code:
On Fri, 4 Dec 2020 06:50:14 GMT, Stuart Marks wrote:
> This rewrites the doc of ArraysSupport.newLength, adds detail to the
> exception message, and adds a test. In addition to some renaming and a bit of
> refactoring of the actual code, I also made two changes of substance to the
> code:
>
Hi Martin,
I'd appreciate it if you could take a look at this.
Thanks,
s'marks
On 12/3/20 10:57 PM, Stuart Marks wrote:
This rewrites the doc of ArraysSupport.newLength, adds detail to the exception
message, and adds a test. In addition to some renaming and a bit of refactoring
of the
This rewrites the doc of ArraysSupport.newLength, adds detail to the exception
message, and adds a test. In addition to some renaming and a bit of refactoring
of the actual code, I also made two changes of substance to the code:
1. I fixed a problem with overflow checking. In the original code,
31 matches
Mail list logo