Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove now unused API-tools system-packages profiles #285

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apitools/org.eclipse.pde.api.tools/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ bin.includes = .,\
META-INF/,\
plugin.xml,\
lib/apitooling-ant.jar,\
scripts/,\
system_packages/
scripts/
jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar,platform:/plugin/org.objectweb.asm
jars.compile.order = .,\
lib/apitooling-ant.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,29 +245,20 @@ private void initialize(ExecutionEnvironmentDescription ee) throws CoreException
}
}


private static Properties getPropertiesFromURL(URL profileURL) {
InputStream is = null;
try {
URL resolvedURL = FileLocator.resolve(profileURL);
URLConnection openConnection = resolvedURL.openConnection();
openConnection.setUseCaches(false);
is = openConnection.getInputStream();
if (is != null) {
Properties profile = new Properties();
profile.load(is);
return profile;
}
} catch (IOException e) {
ApiPlugin.log(e);
} finally {
try {
try (InputStream is = openConnection.getInputStream()) {
if (is != null) {
is.close();
Properties profile = new Properties();
profile.load(is);
return profile;
}
} catch (IOException e) {
ApiPlugin.log(e);
}
} catch (IOException e) {
ApiPlugin.log(e);
}
return null;
}
Expand Down Expand Up @@ -302,11 +293,7 @@ public static Properties getJavaProfileProperties(String ee) {
private void initialize(Properties profile, ExecutionEnvironmentDescription description) throws CoreException {
String value = profile.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES);
if (value == null) {
// In Java-10 and beyond, we take systempackages list from
// org.eclipse.pde.api.tools\system_packages\JavaSE-x-systempackages.profile
// They are calculated by launching eclipse in Java x and then using
// org.eclipse.osgi.storage.Storage.calculateVMPackages
// Post Java 18 we use TargetPlatformHelper.querySystemPackages
// In Java-10 and beyond, we query system-packages list from the JRE
String environmentId = description.getProperty(ExecutionEnvironmentDescription.CLASS_LIB_LEVEL);
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment environment = manager.getEnvironment(environmentId);
Expand Down

This file was deleted.

Loading