提交 876069ff 编写于 作者: D dholmes

8009429: Miscellaneous profiles cleanup

Reviewed-by: jjg, alanb
上级 8fc4c3be
......@@ -149,12 +149,13 @@ public abstract class Profiles {
}
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 @@ public abstract class Profiles {
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++;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册