# HG changeset patch # User psandoz # Date 1426524274 -3600 # Node ID 7ce6ea270c01eeda44332866102dad0e5577361d # Parent a4bf9a57003546783c009cafecef8e3dd65b06f5 8075230: Optimized count operations incorrectly declare the stream shape Reviewed-by: chegar diff -r a4bf9a570035 -r 7ce6ea270c01 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 makeIntCounting() { - return new ReduceOp>(StreamShape.REFERENCE) { + return new ReduceOp>(StreamShape.INT_VALUE) { @Override public CountingSink makeSink() { return new CountingSink.OfInt(); } @@ -583,7 +583,7 @@ */ public static TerminalOp makeLongCounting() { - return new ReduceOp>(StreamShape.REFERENCE) { + return new ReduceOp>(StreamShape.LONG_VALUE) { @Override public CountingSink makeSink() { return new CountingSink.OfLong(); } @@ -752,7 +752,7 @@ */ public static TerminalOp makeDoubleCounting() { - return new ReduceOp>(StreamShape.REFERENCE) { + return new ReduceOp>(StreamShape.DOUBLE_VALUE) { @Override public CountingSink makeSink() { return new CountingSink.OfDouble(); }