This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
PATCH: PR 331
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: PATCH: PR 331
- From: Warren Levy <warrenl at cygnus dot com>
- Date: Mon, 18 Dec 2000 23:31:39 -0800 (PST)
Folks,
Here's a patch that takes care of the null pointer exception generated by
the test code of this bug. Note that there's still more to do to get
timezone displays right for all timezones. But that is part of other
fixes that are forthcoming.
--warrenl
2000-12-18 Warren Levy <warrenl@redhat.com>
* java/util/GregorianCalendar.java (GregorianCalendar): Constructors
need to set timezone to a valid non-null value.
Index: java/util/GregorianCalendar.java
===================================================================
RCS file: /cvs/gcc/egcs/libjava/java/util/GregorianCalendar.java,v
retrieving revision 1.6
diff -u -p -r1.6 GregorianCalendar.java
--- GregorianCalendar.java 2000/10/27 10:33:46 1.6
+++ GregorianCalendar.java 2000/12/19 06:30:49
@@ -114,7 +114,7 @@ public class GregorianCalendar extends C
public GregorianCalendar (int year, int month, int date)
{
- this((TimeZone) null);
+ this();
setDefaultTime ();
set (year, month, date);
}
@@ -122,7 +122,7 @@ public class GregorianCalendar extends C
public GregorianCalendar (int year, int month, int date,
int hour, int minute)
{
- this((TimeZone) null);
+ this();
setDefaultTime ();
set (year, month, date, hour, minute);
}
@@ -130,7 +130,7 @@ public class GregorianCalendar extends C
public GregorianCalendar (int year, int month, int date,
int hour, int minute, int second)
{
- this((TimeZone) null);
+ this();
setDefaultTime ();
set (year, month, date, hour, minute, second);
}