- 
    Type:
Bug
 - 
    Resolution: Duplicate
 - 
    Priority:
  P4                     
     - 
    None
 - 
    Affects Version/s: 8, 11, 12
 - 
    Component/s: core-libs
 
- 
        generic
 - 
        generic
 
                    ADDITIONAL SYSTEM INFORMATION :
Affects all OSs since library's inclusion in Java 8
A DESCRIPTION OF THE PROBLEM :
The exceptions thrown (or not thrown) by ValueRange.of (https://docs.oracle.com/javase/10/docs/api/java/time/temporal/ValueRange.html#of(long,long,long,long)) do not match the documentation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Attempt to instantiate a ValueRange with minSmallest larger than minLargest
Attempt to instantiate a ValueRange with minSmallest larger than maxSmallest
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The factory throws an exception
The factory does not throw an exception
(respectively)
ACTUAL -
The factory does not throw an exception
The factory throws an exception
(respectively)
Although I agree with the exception we _are_ getting, and feel the documentation needs to be updated to include the unlisted case.
---------- BEGIN SOURCE ----------
https://gist.github.com/Clockwork-Muse/3505cd56d254789df69725d5f9debc86
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None required - exception edge cases.
FREQUENCY : always
            
Affects all OSs since library's inclusion in Java 8
A DESCRIPTION OF THE PROBLEM :
The exceptions thrown (or not thrown) by ValueRange.of (https://docs.oracle.com/javase/10/docs/api/java/time/temporal/ValueRange.html#of(long,long,long,long)) do not match the documentation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Attempt to instantiate a ValueRange with minSmallest larger than minLargest
Attempt to instantiate a ValueRange with minSmallest larger than maxSmallest
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The factory throws an exception
The factory does not throw an exception
(respectively)
ACTUAL -
The factory does not throw an exception
The factory throws an exception
(respectively)
Although I agree with the exception we _are_ getting, and feel the documentation needs to be updated to include the unlisted case.
---------- BEGIN SOURCE ----------
https://gist.github.com/Clockwork-Muse/3505cd56d254789df69725d5f9debc86
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None required - exception edge cases.
FREQUENCY : always
- duplicates
 - 
                    
JDK-8239520 ValueRange.of(long, long, long) does not throw IAE on invalid inputs
-         
     - Closed
 
 -