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

javac erroneously reject a a service interface inner class in a provides clause

    Details

    • Subcomponent:
    • Resolved In Build:
      b144
    • Verification:
      Verified

      Description

      Now compiler (b138) rejects inner class as service interface if service implementation is nested static class with error:
      the service definition is an inner class: Outer.Inter

      Although there is no spec restriction on service interface to be inner class.

      -----------------------------
      Minimal test case:
      module-info.java:
      module mod {
          exports pack1;
          provides lpack1.Outer.Inter with pack1.Outer1.Implem;
      }

      pack1/Outer.java:
      public class Outer {
          public class Inter {
          }
      }

      pack1/Outer1.java:
      public class Outer1{
          public static class Implem extends Outer.Inter {
              public Implem () {
                  new Outer().super();
              }
          }
      }

      This bug cause failure of tests lang/MOD/mod074

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                kbarzilovich Konstantin Barzilovich (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: