RFR: 8023681: Fix raw type warning caused by Sink
mike.duigou at oracle.com
Fri Aug 23 21:40:44 UTC 2013
I considered that as well but since the types are generics you'd have to cast anyway.
The only viable declaration is:
private static Function<?,?> CASTING_IDENTITY = i -> i;
On usage you'd have to add (Function<I,R>) CASTING_IDENTITY
(Which assumes the compiler would even accept this heinous cast, I haven't tried it)
On Aug 23 2013, at 14:18 , Ali Ebrahimi wrote:
> Why not to make castingIdentity method a constant?
> On Fri, Aug 23, 2013 at 11:47 PM, Henry Jen <henry.jen at oracle.com> wrote:
>> Please kindly review the fix for eliminate some warnings in
>> java.util.stream package.
>> Chained Sink is an internal implementation detail, add the type for
>> downstream is more precise but verbose.
>> Included is also a couple other warnings cleanup.
More information about the core-libs-dev