From b44d4288bb2911b573ec12dd00d7c601e5d7a825 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 18 Mar 2014 13:47:32 +0100 Subject: fix add PEPS or attribute error if PEPS list or attribute list is empty --- .../moa/id/configuration/data/GeneralStorkConfig.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment') 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(); + attributes = new ArrayList(); + if (stork != null) { // deep clone all the things // to foreclose lazyloading session timeouts - cpepslist = new ArrayList(); + for(CPEPS current : stork.getCPEPS()) { cpepslist.add(current); } - + List tmp = stork.getAttributes(); if(null != tmp) { - attributes = new ArrayList(); + 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()); } } } -- cgit v1.2.3