changeset 1775:82dc1e827c2a

8009429: Miscellaneous profiles cleanup Reviewed-by: jjg, alanb
author dholmes
date Thu, 14 Mar 2013 01:45:44 -0400
parents e0ef84e33167
children 2e21ecd7a5ad
files src/share/classes/com/sun/tools/javac/sym/Profiles.java
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/sym/Profiles.java	Wed Mar 13 14:47:15 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/sym/Profiles.java	Thu Mar 14 01:45:44 2013 -0400
@@ -149,12 +149,13 @@
         }
 
         final static Map<String, Package> packages = new TreeMap<String, Package>();
-        int maxProfile;
+
+        final int maxProfile = 4;  // Three compact profiles plus full JRE
 
         MakefileProfiles(Properties p) {
-            int profile = 1;
-            while (true) {
-                String inclPackages = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_PACKAGES");
+            for (int profile = 1; profile <= maxProfile; profile++) {
+                String prefix = (profile < maxProfile ? "PROFILE_" + profile : "FULL_JRE");
+                String inclPackages = p.getProperty(prefix + "_RTJAR_INCLUDE_PACKAGES");
                 if (inclPackages == null)
                     break;
                 for (String pkg: inclPackages.substring(1).trim().split("\\s+")) {
@@ -162,22 +163,20 @@
                         pkg = pkg.substring(0, pkg.length() - 1);
                     includePackage(profile, pkg);
                 }
-                String inclTypes =  p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_TYPES");
+                String inclTypes =  p.getProperty(prefix + "_RTJAR_INCLUDE_TYPES");
                 if (inclTypes != null) {
                     for (String type: inclTypes.replace("$$", "$").split("\\s+")) {
                         if (type.endsWith(".class"))
                             includeType(profile, type.substring(0, type.length() - 6));
                     }
                 }
-                String exclTypes =  p.getProperty("PROFILE_" + profile + "_RTJAR_EXCLUDE_TYPES");
+                String exclTypes =  p.getProperty(prefix + "_RTJAR_EXCLUDE_TYPES");
                 if (exclTypes != null) {
                     for (String type: exclTypes.replace("$$", "$").split("\\s+")) {
                         if (type.endsWith(".class"))
                             excludeType(profile, type.substring(0, type.length() - 6));
                     }
                 }
-                maxProfile = profile;
-                profile++;
             }
         }