aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-12-19 10:31:45 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-12-19 10:31:45 +0100
commitc61df20d52e8c2744dd30078ae20f3b37c0b2110 (patch)
tree72dac7bce3b64c5fa1ba43c44ed51e984307a006 /id
parent85984d9432521ea4e14039d37d434f863c492cf1 (diff)
downloadmoa-id-spss-c61df20d52e8c2744dd30078ae20f3b37c0b2110.tar.gz
moa-id-spss-c61df20d52e8c2744dd30078ae20f3b37c0b2110.tar.bz2
moa-id-spss-c61df20d52e8c2744dd30078ae20f3b37c0b2110.zip
fix problem with empty database
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java3
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
index 31c29aef0..4236c0d13 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
@@ -241,6 +241,9 @@ public class EditGeneralConfigAction extends BasicAction {
}
MOAIDConfiguration dbconfig = ConfigurationDBRead.getMOAIDConfiguration();
+ if (dbconfig == null)
+ dbconfig = new MOAIDConfiguration();
+
AuthComponentGeneral dbauth = dbconfig.getAuthComponentGeneral();
if (dbauth == null) {
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
index a3f445fcf..6efdd6223 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
@@ -152,7 +152,7 @@ public class ConfigurationDBRead {
if (result.size() == 0) {
Logger.trace("No entries found. Create fresh instance.");
- return new MOAIDConfiguration();
+ return null;
}
return (MOAIDConfiguration) result.get(0);