JDK-8019976 : JVM does not prohibit access to private interface methods in c.f.v. 52.0 during method resolution
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-07-05
  • Updated: 2013-07-09
  • Resolved: 2013-07-09
Related Reports
Duplicate :  
Relates :  
Description
Please use attached sources to reproduce such behaviour.

$ /java/re/jdk/8/promoted/ea/b97/binaries/solaris-sparc/bin/java -jar \
  /java/re/asmtools/5.0/promoted/ea/b02/binaries/asmtools-5.0/lib/asmtools.jar \
  jasm resolveMethod00602m10n.jasm -d . 
resolveMethod00602m10n.jasm:39: Warning: interface method must be abstract public only  "private    *****private *****".
    private Method m:"()I"
                   ^
1 warning

$ /java/re/jdk/8/promoted/ea/b97/binaries/solaris-sparc/bin/javac -g:none \
  resolveMethod00602m1.java -d .
Note: resolveMethod00602m1.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

$ /java/re/jdk/8/promoted/ea/b97/binaries/solaris-sparc/bin/java -cp . javasoft.sqe.tests.vm.constantpool.resolveMethod.resolveMethod006.resolveMethod00602m1.resolveMethod00602m1
Failed to reject invalid class resolveMethod00602m10n