aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-07-10 12:26:43 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-07-10 12:26:43 +0200
commit34ac95193f76a30f3bc96761c5bb02c5048f5a69 (patch)
tree5fdd3895b5b3c9453dd2531fcf58352ed780fca7 /id/ConfigWebTool/src/main/java
parent31e11e635b2dc72542ea2af1e302d83c6a8c7c13 (diff)
downloadmoa-id-spss-34ac95193f76a30f3bc96761c5bb02c5048f5a69.tar.gz
moa-id-spss-34ac95193f76a30f3bc96761c5bb02c5048f5a69.tar.bz2
moa-id-spss-34ac95193f76a30f3bc96761c5bb02c5048f5a69.zip
solve problem with empty configuration
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java35
1 files changed, 22 insertions, 13 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
index b1e268fef..5e177655d 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
@@ -80,7 +80,7 @@ public class GeneralStorkConfig {
}
if (cpepslist.isEmpty())
- cpepslist.add(new CPEPS());
+ cpepslist = null;
if(attributes.isEmpty())
attributes.add(new StorkAttribute());
@@ -94,21 +94,30 @@ public class GeneralStorkConfig {
return null;
MOAIDConfiguration dbconfig = ConfigurationDBRead.getMOAIDConfiguration();
-
- List<CPEPS> cpepss = dbconfig.getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS();
-
- // make CountryCode "readonly"
- for (CPEPS newone : cpepslist) {
- for (CPEPS current : cpepss) {
- if (null != newone)
- if (current.getHjid().equals(newone.getHjid())) {
- newone.setCountryCode(current.getCountryCode());
- break;
+
+ try {
+ List<CPEPS> cpepss = dbconfig.getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS();
+
+ if (cpepss != null) {
+ // make CountryCode "readonly"
+ for (CPEPS newone : cpepslist) {
+ for (CPEPS current : cpepss) {
+ if (null != newone)
+ if (current.getHjid().equals(newone.getHjid())) {
+ newone.setCountryCode(current.getCountryCode());
+ break;
+ }
}
+ }
}
- }
- return cpepslist;
+ return cpepslist;
+
+ } catch (NullPointerException e) {
+ return null;
+
+ }
+
}
public void setCpepslist(List<CPEPS> list) {