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

java.util.GregorianCalendar.computeTime() defaults to BC

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.1.1
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.1.1
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      This is a showstopper for JDK 1.1.1, but it has a clear fix.

      Down in GregorianCalendar.computeTime(), there is this call:

      int era = this.internalGet(Calendar.ERA);

      But era ususally isn't set, so this almost always comes out as BC.
      Here's a fix:

              int era;
              if (isSet(Calendar.ERA)) {
                  era = this.internalGet(Calendar.ERA);
              } else {
                  era = AD;
              }

      Other uses of Calendar.ERA should be scrutinized, but this is the
      one that causes problems with SSL certificates.

      bill.foote@Eng 1997-03-07

        Attachments

          Activity

            People

            Assignee:
            apalanissunw Anand Palaniswamy (Inactive)
            Reporter:
            bfootesunw Bill Foote (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: