summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kellner <tobias.kellner@iaik.tugraz.at>2015-10-08 17:53:57 +0200
committerTobias Kellner <tobias.kellner@iaik.tugraz.at>2015-10-08 17:56:11 +0200
commit7776caf451bc69219c1455234378c919710595b4 (patch)
tree90bacc0663cdc1c28c42b4f9b7535bb75b644bbc
parent296f9d06d36ddd0063d86f6f9e585e3de3ded471 (diff)
downloadpdf-over-7776caf451bc69219c1455234378c919710595b4.tar.gz
pdf-over-7776caf451bc69219c1455234378c919710595b4.tar.bz2
pdf-over-7776caf451bc69219c1455234378c919710595b4.zip
Only store proxy config if it is really set
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index 886ec793..c43f3293 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -297,11 +297,20 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
props.clear();
props.setProperty(Constants.CFG_BKU, getDefaultBKUPersistent().toString());
- props.setProperty(Constants.CFG_PROXY_HOST, getProxyHostPersistent());
- props.setProperty(Constants.CFG_PROXY_PORT,
- Integer.toString(getProxyPortPersistent()));
- props.setProperty(Constants.CFG_PROXY_USER, getProxyUserPersistent());
- props.setProperty(Constants.CFG_PROXY_PASS, getProxyPassPersistent());
+
+ String proxyHost = getProxyHostPersistent();
+ if (proxyHost != STRING_EMPTY)
+ props.setProperty(Constants.CFG_PROXY_HOST, proxyHost);
+ int proxyPort = getProxyPortPersistent();
+ if (proxyPort != -1)
+ props.setProperty(Constants.CFG_PROXY_PORT,Integer.toString(proxyPort));
+ String proxyUser = getProxyUserPersistent();
+ if (proxyUser != STRING_EMPTY)
+ props.setProperty(Constants.CFG_PROXY_USER, proxyUser);
+ String proxyPass = getProxyPassPersistent();
+ if (proxyPass != STRING_EMPTY)
+ props.setProperty(Constants.CFG_PROXY_PASS, proxyPass);
+
props.setProperty(Constants.CFG_EMBLEM, getDefaultEmblemPersistent());
props.setProperty(Constants.CFG_SIGNATURE_NOTE, getSignatureNote());
props.setProperty(Constants.CFG_MOBILE_NUMBER, getDefaultMobileNumberPersistent());