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

Synthesized static enum method values() is final

XMLWordPrintable

    • 5.0
    • b89
    • generic
    • generic
    • Verified

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: