This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug in static initialization


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);
  }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]