-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
None
-
b117
Currently IntStream.boxed(), LongStream.boxed(), DoubleStream.boxed() operations remove SORTED and DISTINCT flags, though in fact these operations do preserve them. This is especially important as distinct() for primitive streams is implemented like "boxed().distinct().unbox" where boxed() kills the flags which could be used for distinct() optimization.
Similarly IntStream.asLongStream() unnecessarily remove SORTED and DISTINCT flags. IntStream.asDoubleStream() and LongStream.asDoubleStream() also could preserve SORTED (but not DISTINCT, at least for LongStream.asDoubleStream()).
Similarly IntStream.asLongStream() unnecessarily remove SORTED and DISTINCT flags. IntStream.asDoubleStream() and LongStream.asDoubleStream() also could preserve SORTED (but not DISTINCT, at least for LongStream.asDoubleStream()).