> On 12 Apr 2016, at 18:37, Tagir F. Valeev wrote:
>
> Hello!
>
> Thank you, Stefan and Paul for review. Here's updated webrev:
>
> http://cr.openjdk.java.net/~tvaleev/webrev/8153293/r2/
>
Looks good. I will push for you this week.
Paul.
Hi Tagir,
thanks! Looks fine to me now - especially the new testSortDistinct() methods.
But note: I'm only a participant, not a reviewer of any sort.
Thanks,
Stefan
2016-04-12 18:37 GMT+02:00 Tagir F. Valeev :
> Hello!
>
> Thank you, Stefan and Paul for review. Here's
Hello!
Thank you, Stefan and Paul for review. Here's updated webrev:
http://cr.openjdk.java.net/~tvaleev/webrev/8153293/r2/
Changes:
- all new mapToObj are private and not final
- IntStream.asDoubleStream preserves distinct now
- Tests fixed according to Stefan's suggestions
- Additional tests
Hi Tagir,
another minor issue. The testFlags() methods in IntPrimitiveOpsTests
/ LongPrimitiveOpsTests each have a duplicated assert:
IntPrimitiveOpsTests:
assertFalse(IntStreams.of(1, 10).boxed().spliterator()
.hasCharacteristics(Spliterator.SORTED));
LongPrimitiveOpsTests:
Hi Tagir,
a few comments below
a) IntPipeline: public final mapToObj(IntFunction mapper,
int opFlags) should be private, not public
b) IntPipeline: asDoubleStream() - as already discussed, 0 should be
passed as the opFlags value to the DoublePipeline.StatelessOp
constructor
c) I think, the
> On 4 Apr 2016, at 21:28, Stefan Zobel wrote:
>
> Hi Tagir,
>
> good catch! I like the proposal.
>
Me too. +1.
Extra bonus points to test, in addition to the tested characteristics, that the
boxed/converted elements remain sorted/distinct :-)
>>
>> (different
Hi Tagir,
good catch! I like the proposal.
>
> (different longs can be converted into the same double, so DISTINCT is
> not preserved here; not sure whether this is possible for ints)
>
I think IntStream.asDoubleStream() can also preserve DISTINCT as
different ints can't be mapped to the same
Hello!
Please review and sponsor the following patch:
http://cr.openjdk.java.net/~tvaleev/webrev/8153293/r1/
The patch preserves more characteristics on primitive stream
operations:
IntStream/LongStream/DoubleStream.boxed() preserves SORTED and DISTINCT
IntStream.asLongStream() preserves SORTED