8075230: Optimized count operations incorrectly declare the stream shape
authorpsandoz
Mon, 16 Mar 2015 17:44:34 +0100
changeset 29493 7ce6ea270c01
parent 29492 a4bf9a570035
child 29494 13a73071b538
8075230: Optimized count operations incorrectly declare the stream shape Reviewed-by: chegar
jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java
--- a/jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java	Mon Mar 16 19:09:13 2015 +0400
+++ b/jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java	Mon Mar 16 17:44:34 2015 +0100
@@ -414,7 +414,7 @@
      */
     public static TerminalOp<Integer, Long>
     makeIntCounting() {
-        return new ReduceOp<Integer, Long, CountingSink<Integer>>(StreamShape.REFERENCE) {
+        return new ReduceOp<Integer, Long, CountingSink<Integer>>(StreamShape.INT_VALUE) {
             @Override
             public CountingSink<Integer> makeSink() { return new CountingSink.OfInt(); }
 
@@ -583,7 +583,7 @@
      */
     public static TerminalOp<Long, Long>
     makeLongCounting() {
-        return new ReduceOp<Long, Long, CountingSink<Long>>(StreamShape.REFERENCE) {
+        return new ReduceOp<Long, Long, CountingSink<Long>>(StreamShape.LONG_VALUE) {
             @Override
             public CountingSink<Long> makeSink() { return new CountingSink.OfLong(); }
 
@@ -752,7 +752,7 @@
      */
     public static TerminalOp<Double, Long>
     makeDoubleCounting() {
-        return new ReduceOp<Double, Long, CountingSink<Double>>(StreamShape.REFERENCE) {
+        return new ReduceOp<Double, Long, CountingSink<Double>>(StreamShape.DOUBLE_VALUE) {
             @Override
             public CountingSink<Double> makeSink() { return new CountingSink.OfDouble(); }