JDK-8172148 : MR jar API validator doesn't detect new public/protected inner classes.
  • Type: Bug
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-12-30
  • Updated: 2018-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Cloners :  
Relates :  
Relates :  
Description
Create two classes, compile and put them in base and v10 directories respectively 
public class C { 
   public void m(){} 
} 

public class C { 
   public class Inner{ public void k(){} }
   public void m(){} 
} 

create MR jar 
jar cf file.jar -C base C.class, 
                --release 10 -C v10 C.class 

jar tool exits successfully.
Comments
Uncomment test http://hg.openjdk.java.net/jdk9/dev/jdk/file/e15c8b97a107/test/tools/jar/multiRelease/ApiValidatorTest.java#l132 once the issue is fixed
18-01-2017

The validator currently works on a best effort basis and should be good enough to catch basic changes in an API, such as the addition of new methods or fields. This case is likely easier to detect than that for JDK-8172147 (different return types).
09-01-2017