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

Fredrik Öhrström oehrstroem at gmail.com
Thu Sep 19 05:26:21 PDT 2013

Oups, I already fixed this one (and the port one), but the fix has not been
committed. Here it is:

sjavac should not create multiple packages with the same name. They occur
because of a bug
in copyPackagesExcept. See webrev. Please verify! :-)


2013/9/18 Andreas Lundblad <andreas.lundblad at oracle.com>

> 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/<http://cr.openjdk.java.net/~alundblad/8024609/webrev.00/>
> Link to bug report:
> https://bugs.openjdk.java.net/**browse/JDK-8024609<https://bugs.openjdk.java.net/browse/JDK-8024609>
> -- Andreas Lundblad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20130919/26377107/attachment.html 

More information about the compiler-dev mailing list