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

clss06603.html: JLS8.2.1.1 access to method inherited from non-public class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5.1

      Description

      A test based on 4123980 has been added to the JCK. Compiling this
      test should result in a compile-time error; however it compiles
      successfully with the new compiler (jdk1.3d). Since this problem was
      previously fixed in jdk1.2, the new behaviour represents a regression.

      lang/CLSS/clss066/clss06603/clss06603.html

      The following is a simplification of this test:

      FILE: a/AccessMethNonPubClsA.java

      package a;

      import b.AccessMethNonPubClsB;

      public class AccessMethNonPubClsA extends OtherClass {
          public static void main(String argv[]) {
      System.out.println("failed!");
          }
      }

      class OtherClass {
          void inaccessibleMethod() {
          }
      }

      FILE: b/AccessMethNonPubClsB.java

      package b;

      import a.AccessMethNonPubClsA;

      public class AccessMethNonPubClsB extends AccessMethNonPubClsA {
      }

      COMPILE COMMAND:

      $ javac -classpath . b/AccessMethNonPubClsB.java a/AccessMethNonPubClsA.java

      iris.garcia@eng 1999-05-21

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wmaddoxsunw William Maddox (Inactive)
              Reporter:
              iris Iris Clark
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: