changeset 2351:a04b7eb6733f

8039231: [javadoc] test failure caused by javax.crypto fix Reviewed-by: jjg
author ksrini
date Fri, 04 Apr 2014 18:36:16 -0700
parents 5d87b6068c99
children 04419fec8fd4
files src/share/classes/com/sun/tools/javac/sym/Profiles.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/sym/Profiles.java	Thu Apr 03 12:04:58 2014 -0700
+++ b/src/share/classes/com/sun/tools/javac/sym/Profiles.java	Fri Apr 04 18:36:16 2014 -0700
@@ -147,6 +147,8 @@
         final int maxProfile = 4;  // Three compact profiles plus full JRE
 
         MakefileProfiles(Properties p) {
+            // consider crypto, only if java/lang package exists
+            boolean foundJavaLang = false;
             for (int profile = 1; profile <= maxProfile; profile++) {
                 String prefix = (profile < maxProfile ? "PROFILE_" + profile : "FULL_JRE");
                 String inclPackages = p.getProperty(prefix + "_RTJAR_INCLUDE_PACKAGES");
@@ -155,6 +157,8 @@
                 for (String pkg: inclPackages.substring(1).trim().split("\\s+")) {
                     if (pkg.endsWith("/"))
                         pkg = pkg.substring(0, pkg.length() - 1);
+                    if (foundJavaLang == false && pkg.equals("java/lang"))
+                        foundJavaLang = true;
                     includePackage(profile, pkg);
                 }
                 String inclTypes =  p.getProperty(prefix + "_RTJAR_INCLUDE_TYPES");
@@ -179,7 +183,8 @@
              * javax/net/ssl package. Thus, this package is added to compact1,
              * implying that it should exist in all three profiles.
              */
-             includePackage(1, "javax/crypto");
+            if (foundJavaLang)
+                includePackage(1, "javax/crypto");
         }
 
         @Override