RFR: 8024609: sjavac assertion fails during call to BuildState.collectArtifacts

Andreas Lundblad andreas.lundblad at oracle.com
Wed Sep 18 06:02:19 PDT 2013


Hi,

Please review the fix for JDK-8024609 below.

Description:
An assertion in BuildState.collectArtifacts (line 135) compares packages 
by reference. This assertion does not hold.

The Packages.equals method compares package names (which includes the 
module name). Since two Package instances with the same name/module 
refers to the same actual package, .equals should be sufficient in this 
case.

(Looking at the rest of the code, the creation of multiple packages with 
the same name seems intentional, which is why I believe that it is the 
assertion that should be corrected, not the rest of the code.)


Link to web review:
http://cr.openjdk.java.net/~alundblad/8024609/webrev.00/

Link to bug report:
https://bugs.openjdk.java.net/browse/JDK-8024609


-- Andreas Lundblad



More information about the compiler-dev mailing list