ChronoField.getName method redundant with ChronoField.name

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • 8
    • b102
    • generic
    • generic
    • Verified

      ChronoField has overlapping methods; the name method is inherited from Enum
      and getName defined in the TemporalField interface. Enum also defines the valueOf method is the complement to the name method, parsing its output.

      In addition, for Enums the toString method is defined to be the 'programmer-friendly' name of the enum constant.

      The TemporalField.getName and Enum.toString methods have the same function and general description.

      The TemporalField.getName method should be renamed to toString.

      Note that TemporalField.getDisplayName(locale) is also defined to return the localized field name.

            Assignee:
            Roger Riggs
            Reporter:
            Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: