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

The compiler denies access to the protected inner class by using its full name

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      rc2
    • CPU:
      sparc
    • OS:
      solaris_7
    • Verification:
      Verified

      Description

      The compiler deny access to the protected inner class by using its full name.
      See example.
      If "A.AInner" change to "AInner", all works correcly.
      This bug appears in the JDK1.3.0rc2-V, JDK1.3.0rc2-U compiler works correctly.
      -------------------example ---------------------
      ------------- A.java --------------------
      package test;
      public class A {
          protected class AInner {
          }
      }
      ------------ B.java ------------------
      import test.A;

      class B extends A {
          public class BInner extends A.AInner {

          }
      }
      ---------------- 1.3.0rc2-V output ---------------
       #>javac -d . A.java B.java
      B.java:4: test.A.AInner has protected access in test.A
          public class BInner extends A.AInner {
                                       ^
      1 error
      -----------------1.3.0rc2-U--------------
       #>javac -d . A.java B.java
      ----------------------------------------

        Attachments

          Activity

            People

            Assignee:
            wmaddoxsunw William Maddox (Inactive)
            Reporter:
            alisunw Ali Ali (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: