Index: java/util/SimpleTimeZone.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/SimpleTimeZone.java,v retrieving revision 1.19 diff -u -r1.19 SimpleTimeZone.java --- java/util/SimpleTimeZone.java 7 Jan 2005 09:38:28 -0000 1.19 +++ java/util/SimpleTimeZone.java 8 Jan 2005 10:38:31 -0000 @@ -430,6 +430,8 @@ */ private int checkRule(int month, int day, int dayOfWeek) { + if (month < 0 || month > 11) + throw new IllegalArgumentException("month out of range"); int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { @@ -589,7 +591,7 @@ * * Note that this API isn't incredibly well specified. It appears that the * after flag must override the parameters, since normally, the day and - * dayofweek can select this. I.e., if day < 0 and dayOfWeek < 0, on or + * dayofweek can select this. I.e., if day < 0 and dayOfWeek < 0, on or * before mode is chosen. But if after == true, this implementation * overrides the signs of the other arguments. And if dayOfWeek == 0, it * falls back to the behavior in the other APIs. I guess this should be