aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-01-24 13:42:28 (EST)
committerPascal Rapicault2013-01-24 13:56:17 (EST)
commite431a9ec4fab992b9250189c4cf756817a3f0196 (patch)
treea083fa97402880d38c377c5280577ef097a1458c
parente290b1c4e18b0ccf49fe48fb02210473a9471b43 (diff)
downloadrt.equinox.framework-e431a9ec4fab992b9250189c4cf756817a3f0196.zip
rt.equinox.framework-e431a9ec4fab992b9250189c4cf756817a3f0196.tar.gz
rt.equinox.framework-e431a9ec4fab992b9250189c4cf756817a3f0196.tar.bz2
make sure that all code paths merge the properties in the system.properties
-rw-r--r--bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
index 48205a1..5b5e024 100644
--- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
+++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
@@ -1783,8 +1783,10 @@ public class Main {
}
}
- // Now we know where the base configuration is supposed to be. Go ahead and load PASCAL _CHANGE THE COMMENT
- // it and merge into the System properties. Then, if cascaded, read the parent configuration
+ // Now we know where the base configuration is supposed to be. Go ahead and load
+ // it and merge into the System properties. Then, if cascaded, read the parent configuration.
+ // Note that in a cascaded situation, the user configuration may be ignored if the parent
+ // configuration has changed since the execution.
// Note that the parent may or may not be the same parent as we read above since the
// base can define its parent. The first parent we read was either defined by the user
// on the command line or was the one in the install dir.
@@ -1797,6 +1799,7 @@ public class Main {
if (configuration != null && "false".equalsIgnoreCase(configuration.getProperty(PROP_CONFIG_CASCADED))) { //$NON-NLS-1$
System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
configuration.remove(PROP_SHARED_CONFIG_AREA);
+ mergeProperties(System.getProperties(), configuration, null);
} else {
ensureAbsolute(PROP_SHARED_CONFIG_AREA);
URL sharedConfigURL = buildLocation(PROP_SHARED_CONFIG_AREA, null, ""); //$NON-NLS-1$
@@ -1809,10 +1812,13 @@ public class Main {
}
// if the parent location is different from the config location, read it too.
if (sharedConfigURL != null) {
- if (sharedConfigURL.equals(getConfigurationLocation()))
- // remove the property to show that we do not have a parent.
+ if (sharedConfigURL.equals(getConfigurationLocation())) {
+ //After all we are not in a shared configuration setup.
+ // - remove the property to show that we do not have a parent
+ // - merge configuration with the system properties
System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
- else {
+ mergeProperties(System.getProperties(), configuration, null);
+ } else {
// if the parent we are about to read is the same as the base config we read above,
// just reuse the base
Properties sharedConfiguration = baseConfiguration;