8039231: [javadoc] test failure caused by javax.crypto fix
authorksrini
Fri, 04 Apr 2014 18:36:16 -0700
changeset 23808 6ec86ba2dfb6
parent 23807 a85a06f3b9d8
child 23809 9405883da95f
8039231: [javadoc] test failure caused by javax.crypto fix Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/javac/sym/Profiles.java
--- a/langtools/src/share/classes/com/sun/tools/javac/sym/Profiles.java	Thu Apr 03 12:04:58 2014 -0700
+++ b/langtools/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