RFR: 8023275: Wrapping collections should override default methods

Mike Duigou mike.duigou at oracle.com
Mon Aug 19 20:01:17 UTC 2013

- @SuppressWarnings("unchecked") would appear to be in some of the cases.

- Replace:

@summary Unit tests for wrapping classes should delegate to default methods


@summary Ensure Collections wrapping classes provide non-default implementations

- ArrayList<Method> list -> List<Method> list

- TestNG DataProviders can return Iterator<Object[]> which means you can return cases.iterator() rather than converting to an array.

On Aug 19 2013, at 12:18 , Henry Jen wrote:

> Hi,
> Please review the webrev at
> http://cr.openjdk.java.net/~henryjen/tl/8023275/0/webrev/
> The patch adds override on default methods for a couple wrapping classed
> and delegate those to underlying class.
> There is a minor revise on synchronizedCollection javadoc to cover Stream.
> A sanity check on wrapper classes to ensure default methods are override.
> Those changes has been in lambda repo since long ago.
> Cheers,
> Henry

More information about the core-libs-dev mailing list