RFR 8025535: Unsafe typecast in java.util.stream.SortedOps

Chris Hegarty chris.hegarty at oracle.com
Wed Oct 2 11:34:39 UTC 2013


The change looks fine to me.

Just curious why we don't allow sizes equal to Nodes.MAX_ARRAY_SIZE? 
Rather less than.

-Chris.

On 01/10/2013 20:30, Paul Sandoz wrote:
> Hi,
>
> Please review the following patch that checks size limits for the sorted operation and fails quickly rather than failing with an obscure ISE or an OOME later on:
>
>    http://cr.openjdk.java.net/~psandoz/tl/JDK-8025535-sorted-unsafe-type-cast/webrev/
>
> Tests have been added that assert for both SIZED and non-SIZED (at pipeline construction) inputs to sorted().
>
> Paul.



More information about the core-libs-dev mailing list