aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/config
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/config')
-rw-r--r--netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
index 8261749..0d4875b 100644
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
@@ -209,6 +209,12 @@ public final class DeploymentConfiguration {
sm.checkRead(userFile.toString());
}
+ File systemConfigFile = findSystemConfigFile();
+
+ load(systemConfigFile, userFile, fixIssues);
+ }
+
+ void load(File systemConfigFile, File userFile, boolean fixIssues) throws ConfigurationException {
Map<String, Setting<String>> initialProperties = Defaults.getDefaults();
Map<String, Setting<String>> systemProperties = null;
@@ -218,7 +224,6 @@ public final class DeploymentConfiguration {
* there is a system-level deployment.poperties file
*/
- File systemConfigFile = findSystemConfigFile();
if (systemConfigFile != null) {
if (loadSystemConfiguration(systemConfigFile)) {
if (JNLPRuntime.isDebug()) {
@@ -257,6 +262,21 @@ public final class DeploymentConfiguration {
}
/**
+ * Copies the current configuration into the target
+ */
+ public void copyTo(Properties target) {
+ Set<String> names = getAllPropertyNames();
+
+ for (String name : names) {
+ String value = getProperty(name);
+ // for Properties, missing and null are identical
+ if (value != null) {
+ target.setProperty(name, value);
+ }
+ }
+ }
+
+ /**
* Get the value for the given key
*
* @param key the property key