RFR: 8171400: Move checking of duplicate packages in the boot layer to link time
Claes Redestad
claes.redestad at oracle.com
Mon Dec 19 20:55:21 UTC 2016
Ouch, the result of applying and then discarding a suggested
improvement.
Too late for this fix, but I'm sure there'll be future changes to this
file that can amend this mistake.
Thanks for spotting it!
/Claes
On 2016-12-19 21:47, Andrej Golovnin wrote:
> Hi Claes,
>
> src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
>
> 313 if (SystemModules.hasSplitPackages() || needPostResolutionChecks) {
> 314 Map<String, String> packageToModule = new HashMap<>();
> 315 for (ResolvedModule resolvedModule : cf.modules()) {
> 316 ModuleDescriptor descriptor =
> 317 resolvedModule.reference().descriptor();
> 318 String name = descriptor.name();
> 319 for (String p : descriptor.packages()) {
> 320 String other = packageToModule.putIfAbsent(p, name);
> 321 if (other != null) {
> 322 fail("Package " + p + " in both module "
> 323 + name + " and module " + other);
> 324 }
> 325 }
> 326 }
> 327 }
>
> I’m sorry for the late review but I think the indentation in the lines 314-327
> is not correct.
>
> Best regards,
> Andrej Golovnin
>
>> On 19 Dec 2016, at 21:38, Claes Redestad <claes.redestad at oracle.com> wrote:
>>
>>
>>
>> On 2016-12-19 20:12, Alan Bateman wrote:
>>>
>>>
>>> On 19/12/2016 18:14, Claes Redestad wrote:
>>>>
>>>>
>>>> Good, thanks.
>>>>
>>>> I polished the comment you took issue with further, updated in place:
>>>>
>>>> http://cr.openjdk.java.net/~redestad/8171400/webrev.01/
>>>>
>>>> Good to go?
>>> Looks good.
>>
>> Thanks, pushed!
>>
>> /Claes
>
More information about the jigsaw-dev
mailing list