JDK-8141241 : Issue JDK-8133168 is reproducible and must be reopened
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8u60
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_8
  • CPU: x86
  • Submitted: 2015-09-26
  • Updated: 2025-12-05
  • Resolved: 2015-11-04
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10240]

A DESCRIPTION OF THE PROBLEM :
Issue JDK-8133168 is reproducible and must be reopened.

To be able to reproduce, Foo.java & VisibilityBridgeTest.java must be in different packages. This is the case for the reporter's example [1], but it isn't the case for the example that was used to evaluate the issue.

Attached are exact steps to reproduce with a test case.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
In a directory X:
- create a file Bar.java
- create a folder "foo", and create a file Foo.java inside the folder foo

Open a command prompt in directory X & do:
javac foo\Foo.java
javac Bar.java
java Bar



REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
// Foo.java =============================

package foo;

public class Foo extends Base {}

class Base {

    public final void foo() {}

    public void bar() {}

}

// Bar.java =============================

import foo.Foo;

public class Bar {

  public static void main(String[] args) throws Exception {
    Foo.class.getMethod("foo").invoke(new Foo());
  }

}

---------- END SOURCE ----------


Comments
This is an duplicate issue of - JDK-8133168, therefore closing this issue. Reopened JDK-8133168 as per the submitter's request. This issue exist in 8u60, 8u72 and 9 ea java.lang.IllegalAccessException: Class net.bytebuddy.VisibilityBridgeTest can not access a member of class foo.Base with modifiers "public final" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296) at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288) at java.lang.reflect.Method.invoke(Method.java:490) at net.bytebuddy.VisibilityBridgeTest.testFinalMethod(VisibilityBridgeTest.java:9) at net.bytebuddy.VisibilityBridgeTest.main(VisibilityBridgeTest.java:20)
05-11-2015