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

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

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0beta
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Not verified

      Description

      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).

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: