diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-18 13:47:32 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-03-18 13:47:32 +0100 |
commit | b44d4288bb2911b573ec12dd00d7c601e5d7a825 (patch) | |
tree | f31de18b41295c0454ce64b8e03cc75cc452124c /id/ConfigWebTool/src/main/java/at | |
parent | c16b22cb73952d815d1e07f0965317866d0527d9 (diff) | |
download | moa-id-spss-b44d4288bb2911b573ec12dd00d7c601e5d7a825.tar.gz moa-id-spss-b44d4288bb2911b573ec12dd00d7c601e5d7a825.tar.bz2 moa-id-spss-b44d4288bb2911b573ec12dd00d7c601e5d7a825.zip |
fix add PEPS or attribute error if PEPS list or attribute list is empty
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at')
-rw-r--r-- | id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java | 17 |
1 files changed, 12 insertions, 5 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 980aa4731..56c3cb654 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 @@ -48,22 +48,23 @@ public class GeneralStorkConfig { if (foreign != null) { STORK stork = foreign.getSTORK(); + cpepslist = new ArrayList<CPEPS>(); + attributes = new ArrayList<StorkAttribute>(); + if (stork != null) { // deep clone all the things // to foreclose lazyloading session timeouts - cpepslist = new ArrayList<CPEPS>(); + for(CPEPS current : stork.getCPEPS()) { cpepslist.add(current); } - + List<StorkAttribute> tmp = stork.getAttributes(); if(null != tmp) { - attributes = new ArrayList<StorkAttribute>(); + for(StorkAttribute current : tmp) attributes.add(current); } - if(attributes.isEmpty()) - attributes.add(new StorkAttribute()); try { qaa = stork.getQualityAuthenticationAssuranceLevel(); @@ -71,6 +72,12 @@ public class GeneralStorkConfig { qaa = 4; } } + + if (cpepslist.isEmpty()) + cpepslist.add(new CPEPS()); + + if(attributes.isEmpty()) + attributes.add(new StorkAttribute()); } } } |