--- 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