- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    1.2.0
- 
        1.2fcs
- 
        sparc
- 
        solaris_2.5
- 
        Verified
Name: avC70361 Date: 07/03/98
java.util.SimpleTimeZone 11 args constructor and setDSTSavings handle wrong
cases when they are invoked with invalid DST offset: an int less than minimum
or greater than maximum value of Calendar.DST_OFFSET. They don't throw
IllegalArgumentException.
Here is a test demonstrating the bug.
---------------IllegalDSTOffset.java-------
import java.util.SimpleTimeZone;
public class IllegalDSTOffsetTest {
public static void main(String args[]) {
SimpleTimeZone tz = new SimpleTimeZone(0, "stz");
try {
tz.setDSTSavings(Integer.MIN_VALUE);
System.out.println("Failed: IllegalArgumentException is not thrown");
} catch(IllegalArgumentException e) {
System.out.println("Passed");
}
}
}
---------The test output--------
> java IllegalDSTOffsetTest
Failed: IllegalArgumentException is not thrown
======================================================================
- duplicates
- 
                    JDK-4160708 java.util.SimpleTimeZone specs are incomplete regarding DST use -           
- Closed
 
-         
- 
                    JDK-4160718 java.util.SimpleTimeZone.useDaylightTime() works wrong -           
- Closed
 
-