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

javac generates unverifiable inner class, JDK-7199823 follow-up

XMLWordPrintable

      When compiling this code:

      public class Test {
           public void start() {
               if (false) {
                   new Runnable() {
                       @Override
                       public void run() {}
                   };
               }
           }

           private static class SomeClass {}

           private static class SomeOtherClass extends SomeClass {}
      }

      javac generates a class name Test$1 that can't be verified. Any attempt to load that class will provoke a ClassFormatError

            vromero Vicente Arturo Romero Zaldivar
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: