langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
changeset 44293 2f47b2c16612
parent 42831 feff6f296019
child 44564 4e1df2513486
equal deleted inserted replaced
44292:0a87e188cae7 44293:2f47b2c16612
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.javadoc.internal.doclets.formats.html;
    26 package jdk.javadoc.internal.doclets.formats.html;
    27 
    27 
       
    28 import java.util.Collections;
    28 import java.util.EnumSet;
    29 import java.util.EnumSet;
    29 import java.util.LinkedHashMap;
    30 import java.util.LinkedHashMap;
    30 import java.util.List;
    31 import java.util.List;
    31 import java.util.Map;
    32 import java.util.Map;
    32 import java.util.Set;
    33 import java.util.Set;
   282                     dependentModules.remove(m);
   283                     dependentModules.remove(m);
   283             }
   284             }
   284                 additionalModules.remove(m);
   285                 additionalModules.remove(m);
   285         }
   286         }
   286         });
   287         });
       
   288 
   287         // Get all packages for the module and put it in the concealed packages set.
   289         // Get all packages for the module and put it in the concealed packages set.
   288         (utils.getModulePackageMap().get(mdle)).forEach((pkg) -> {
   290         utils.getModulePackageMap().getOrDefault(mdle, Collections.emptySet()).forEach((pkg) -> {
   289             if (shouldDocument(pkg)) {
   291             if (shouldDocument(pkg)) {
   290                 concealedPackages.add(pkg);
   292                 concealedPackages.add(pkg);
   291             }
   293             }
   292         });
   294         });
       
   295 
   293         // Get all exported packages for the module using the exports directive for the module.
   296         // Get all exported packages for the module using the exports directive for the module.
   294         (ElementFilter.exportsIn(mdle.getDirectives())).forEach((directive) -> {
   297         (ElementFilter.exportsIn(mdle.getDirectives())).forEach((directive) -> {
   295             PackageElement p = directive.getPackage();
   298             PackageElement p = directive.getPackage();
   296             if (shouldDocument(p)) {
   299             if (shouldDocument(p)) {
   297                 SortedSet<ModuleElement> mdleList = new TreeSet<>(utils.makeModuleComparator());
   300                 SortedSet<ModuleElement> mdleList = new TreeSet<>(utils.makeModuleComparator());