1.1 --- a/src/share/classes/com/sun/tools/javac/sym/Profiles.java Wed Mar 13 14:47:15 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/sym/Profiles.java Thu Mar 14 01:45:44 2013 -0400 1.3 @@ -149,12 +149,13 @@ 1.4 } 1.5 1.6 final static Map<String, Package> packages = new TreeMap<String, Package>(); 1.7 - int maxProfile; 1.8 + 1.9 + final int maxProfile = 4; // Three compact profiles plus full JRE 1.10 1.11 MakefileProfiles(Properties p) { 1.12 - int profile = 1; 1.13 - while (true) { 1.14 - String inclPackages = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_PACKAGES"); 1.15 + for (int profile = 1; profile <= maxProfile; profile++) { 1.16 + String prefix = (profile < maxProfile ? "PROFILE_" + profile : "FULL_JRE"); 1.17 + String inclPackages = p.getProperty(prefix + "_RTJAR_INCLUDE_PACKAGES"); 1.18 if (inclPackages == null) 1.19 break; 1.20 for (String pkg: inclPackages.substring(1).trim().split("\\s+")) { 1.21 @@ -162,22 +163,20 @@ 1.22 pkg = pkg.substring(0, pkg.length() - 1); 1.23 includePackage(profile, pkg); 1.24 } 1.25 - String inclTypes = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_TYPES"); 1.26 + String inclTypes = p.getProperty(prefix + "_RTJAR_INCLUDE_TYPES"); 1.27 if (inclTypes != null) { 1.28 for (String type: inclTypes.replace("$$", "$").split("\\s+")) { 1.29 if (type.endsWith(".class")) 1.30 includeType(profile, type.substring(0, type.length() - 6)); 1.31 } 1.32 } 1.33 - String exclTypes = p.getProperty("PROFILE_" + profile + "_RTJAR_EXCLUDE_TYPES"); 1.34 + String exclTypes = p.getProperty(prefix + "_RTJAR_EXCLUDE_TYPES"); 1.35 if (exclTypes != null) { 1.36 for (String type: exclTypes.replace("$$", "$").split("\\s+")) { 1.37 if (type.endsWith(".class")) 1.38 excludeType(profile, type.substring(0, type.length() - 6)); 1.39 } 1.40 } 1.41 - maxProfile = profile; 1.42 - profile++; 1.43 } 1.44 } 1.45