diff -r 65c218b25b61 -r cf37c3775397 src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Wed Sep 11 08:30:58 2013 -0400 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Wed Sep 11 14:50:11 2013 -0700 @@ -130,10 +130,14 @@ String profileName; for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { profileName = Profile.lookup(i).name; - Content profileLinkContent = getTargetProfileLink("classFrame", - new StringContent(profileName), profileName); - Content li = HtmlTree.LI(profileLinkContent); - ul.addContent(li); + // If the profile has valid packages to be documented, add it to the + // profiles list on overview-summary.html page. + if (configuration.shouldDocumentProfile(profileName)) { + Content profileLinkContent = getTargetProfileLink("classFrame", + new StringContent(profileName), profileName); + Content li = HtmlTree.LI(profileLinkContent); + ul.addContent(li); + } } profilesDiv.addContent(ul); Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv);