Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1220017

fp.bugs<1621>Segv with Date.toString() with bad year

XMLWordPrintable

    • 1.0beta
    • x86
    • windows_nt
    • Not verified

      From: ###@###.###

      Description:
      Run the following code:
          Date d = new Date(1995,7, 16);
          System.out.println("Date = " + d);

      I know that the first arg of Date() should be 95, but when it's not
      the toString() segvs. Either the constructor needs to throw an exception or
      subtract 1900, or the toString() should be fixed to print a date 2 milleniums
      from now (I vote A).

            jag James Gosling (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: