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

Synthesized static enum method values() is final

    Details

    • Subcomponent:
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b89
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      See https://bugs.eclipse.org/bugs/show_bug.cgi?id=141155

      $ cat X.java
      public enum X {
              A, B, C;
      }
      $ javac X.java
      $ javap X
      Compiled from "X.java"
      public final class X extends java.lang.Enum{
          public static final X A;
          public static final X B;
          public static final X C;
          public static final X[] values();
          public static X valueOf(java.lang.String);
          static {};
      }

      The method values() is final which contradicts the JLS.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ahe Peter Ahe
                Reporter:
                ahe Peter Ahe
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: