summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:28:41 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:28:41 +0000
commit47c8c6b377fe51ee60cdad518946613a262792cf (patch)
tree72f19905369f599d0441792ad40d86da475c399c /pdf-over-gui/src/main/java/at/asit
parent0a24f8c56cb0f156bd548883a5e3b53cfc149ce2 (diff)
downloadpdf-over-47c8c6b377fe51ee60cdad518946613a262792cf.tar.gz
pdf-over-47c8c6b377fe51ee60cdad518946613a262792cf.tar.bz2
pdf-over-47c8c6b377fe51ee60cdad518946613a262792cf.zip
More null guards in config
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@341 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProvider.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PersistentConfigProvider.java2
4 files changed, 13 insertions, 7 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
index 88fcfc0d..73e36074 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
@@ -290,7 +290,7 @@ public class ConfigurationComposite extends StateComposite {
this.configurationContainer.setSignatureNote(
this.configProvider.getSignatureNote());
- this.configurationContainer.setLocale(this.configProvider.getConfigLocale());
+ this.configurationContainer.setLocale(this.configProvider.getLocale());
this.configurationContainer.setSignLocale(this.configProvider.getSignLocale());
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProvider.java
index 9d337b6d..7807079b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProvider.java
@@ -116,7 +116,7 @@ public interface ConfigProvider {
* Gets the configured locale
* @return the configured locale
*/
- public Locale getConfigLocale();
+ public Locale getLocale();
/**
* Gets the configured locale
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java
index 12b60c0f..45a834ab 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java
@@ -275,7 +275,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
Point size = this.configuration.getMainWindowSize();
props.setProperty(Constants.CFG_MAINWINDOW_SIZE, size.x + "," + size.y); //$NON-NLS-1$
- Locale configLocale = this.getConfigLocale();
+ Locale configLocale = this.getLocale();
if(configLocale != null) {
props.setProperty(Constants.CFG_LOCALE, LocaleSerializer.getParsableString(configLocale));
}
@@ -822,8 +822,11 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
* @see at.asit.pdfover.gui.workflow.ConfigProvider#getConfigLocale()
*/
@Override
- public Locale getConfigLocale() {
- return this.configuration.getLocale();
+ public Locale getLocale() {
+ Locale locale = this.configuration.getLocale();
+ if (locale == null)
+ locale = Messages.getDefaultLocale();
+ return locale;
}
/* (non-Javadoc)
@@ -843,7 +846,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
*/
@Override
public Locale getSignLocale() {
- return this.configuration.getSignLocale();
+ Locale locale = this.configuration.getSignLocale();
+ if (locale == null)
+ locale = Messages.getDefaultLocale();
+ return locale;
}
/* (non-Javadoc)
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PersistentConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PersistentConfigProvider.java
index c9c02b63..764265fb 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PersistentConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/PersistentConfigProvider.java
@@ -100,7 +100,7 @@ public interface PersistentConfigProvider {
* Gets the configured locale
* @return the configured locale
*/
- public Locale getConfigLocale();
+ public Locale getLocale();
/**
* Gets the configured locale