-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1
-
sparc
-
solaris_2.5
new java.util.Date(long) throws ArrayIndexOutOfBoundsException
when argument is large (eg Long.MAX_VALUE or Long.MIN_VALUE).
=== Here is the test demonstrating the bug ===
class java_sql_Timestamp4 {
public static void main (String args[]) {
java.util.Date d1 = new java.util.Date(Long.MAX_VALUE);
System.out.println(d1);
}
}
=== Here is the output of the test ===
java.lang.ArrayIndexOutOfBoundsException: 2147483633
at java.util.GregorianCalendar.timeToFields(GregorianCalendar.java)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java)
at java.util.Date.<init>(Date.java)
at java_sql_Timestamp4.main(java_sql_Timestamp4.java:3)
when argument is large (eg Long.MAX_VALUE or Long.MIN_VALUE).
=== Here is the test demonstrating the bug ===
class java_sql_Timestamp4 {
public static void main (String args[]) {
java.util.Date d1 = new java.util.Date(Long.MAX_VALUE);
System.out.println(d1);
}
}
=== Here is the output of the test ===
java.lang.ArrayIndexOutOfBoundsException: 2147483633
at java.util.GregorianCalendar.timeToFields(GregorianCalendar.java)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java)
at java.util.Date.<init>(Date.java)
at java_sql_Timestamp4.main(java_sql_Timestamp4.java:3)