-
Bug
-
Resolution: Fixed
-
P4
-
15
-
b12
-
Not verified
A DESCRIPTION OF THE PROBLEM :
The javadoc for ValueRange.of(long min, long maxSmallest, long maxLargest) states that an exception will be thrown if the minimum is greater than the smallest maximum. However, an exception only occurs if the minimum is greater than the largest maximum.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a ValueRange with the following parameters:
ValueRange vr = ValueRange.of(5, 2, 10);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An IllegalArgumentException should be thrown
ACTUAL -
A ValueRange is returned, with a range of 5 - 2/10
---------- BEGIN SOURCE ----------
import java.time.temporal.ValueRange;
public class TestValueRange {
public static void main(String[] args) {
ValueRange vr = ValueRange.of(5, 2, 10);
System.out.println(vr.toString());
}
}
---------- END SOURCE ----------
FREQUENCY : always
The javadoc for ValueRange.of(long min, long maxSmallest, long maxLargest) states that an exception will be thrown if the minimum is greater than the smallest maximum. However, an exception only occurs if the minimum is greater than the largest maximum.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a ValueRange with the following parameters:
ValueRange vr = ValueRange.of(5, 2, 10);
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An IllegalArgumentException should be thrown
ACTUAL -
A ValueRange is returned, with a range of 5 - 2/10
---------- BEGIN SOURCE ----------
import java.time.temporal.ValueRange;
public class TestValueRange {
public static void main(String[] args) {
ValueRange vr = ValueRange.of(5, 2, 10);
System.out.println(vr.toString());
}
}
---------- END SOURCE ----------
FREQUENCY : always
- csr for
-
JDK-8239574 ValueRange.of(long, long, long) does not throw IAE on invalid inputs
- Closed
- duplicates
-
JDK-8210580 java.time.ValueRange: exceptions do not match documentation
- Closed