This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
bug in static initialization
- To: Java Discuss List <java at gcc dot gnu dot org>
- Subject: bug in static initialization
- From: Tom Tromey <tromey at redhat dot com>
- Date: 04 Sep 2001 11:26:38 -0600
- Reply-To: tromey at redhat dot com
If I compile the appended program with `gcj -C' and then run it via
gij, it prints `null'. This is clearly wrong. If I change
`timestampFormat' to be `final', then it works correctly.
I suspect this problem was introduced by some recent changes in gcj.
However I haven't looked to be sure.
Tom
public class sdf
{
protected static String timestampFormat = "yyyy-MM-dd HH:mm:ss";
public static void main(String args[])
{
System.out.println (timestampFormat);
}
}