Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6727

DefinitionType#name() interface method interferes with it's enum implementations

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: None
    • Labels:
      None

      Description

      Since many implementations of DefinitionType interface are enums - it is very unfortunate that it has name() method - since enums have such name and its finalised (may not be overriden).

      This means that we cannot override it for instance in order to provide human readable definition type captions.

      Some concerns about the provided PR and issue in general:

      • #name() method name is unfortunate and should definitely be deprecated
      • current PR solves the problem with Java 8's default methods (for compatibility), which is bad - won't work for 5.4

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apchelintcev Aleksandr Pchelintcev
                Reporter:
                apchelintcev Aleksandr Pchelintcev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: