changeset 8405:56778384450d

Revert change cause regression on RangeTest before further review
author henryjen
date Fri, 26 Apr 2013 00:37:53 -0700
parents 92f1d0575ea4
children fb3c9d9232ac
files src/share/classes/java/util/stream/DoubleStream.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/stream/DoubleStream.java	Thu Apr 25 23:29:30 2013 -0700
+++ b/src/share/classes/java/util/stream/DoubleStream.java	Fri Apr 26 00:37:53 2013 -0700
@@ -806,7 +806,9 @@
         //     than expected
         if (step <= 0 || Double.isNaN(step))
             throw new IllegalArgumentException(String.format("Illegal step: %f", step));
-        else if (startInclusive >= endExclusive)
+        // @@@ Leave out equal case for case like range(INFINITE, INFINITE) or (NaN, Nan)
+        //     We can probably clarify on what values are invalid for start/end
+        else if (startInclusive > endExclusive)
             return empty();
         else {
             double size = Math.ceil((endExclusive - startInclusive) / step);