JDK-8293507 : ClassFileInstaller should copy inner classes by default
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: test
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2022-09-07
  • Updated: 2022-09-07
Related Reports
Relates :  
Description
In JDK-8199290, test/lib/jdk/test/lib/process/ProcessToolsClassFileInstaller.java is fixed to always copy inner classes for the WhiteBox.class. It was feared at the time that some test cases may want to avoid copying the inner classes on purpose. So we decided to require inner classes to be explicitly specified for all other cases.

However, from time to time we have seen problems where inner classes are missing, causing test failures that are hard to diagnose (a recent case was a missing inner class in ProcessTools). Also, the names of anonymous inner classes will change (from $1 to $2, etc), making it hard to maintain an explicit listing of these classes in the test cases.

The proposal is to copy all inner classes by default. This behavior can be disabled by specifying the -noinnerclasses switch.