diff options
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas')
-rw-r--r-- | modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java index feb2853a..4212aae8 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java @@ -572,8 +572,12 @@ public class ErnpRestClient implements IErnpClient { } + // get all eIDAS documents from current ERnP entry or an empty list of no exists + List<Eidas> currentEidasDocs = ernpPersonToKitt.getEidas() != null + ? ernpPersonToKitt.getEidas() : Collections.emptyList(); + // check if eIDAS attribute is already includes an eIDAS-Document - boolean alreadyExist = ernpPersonToKitt.getEidas().stream() + boolean alreadyExist = currentEidasDocs.stream() .filter(el -> el.getWert().equals(attrValue) && el.getArt().equals(attrName) && el.getStaatscode2().equals(citizenCountryCode)) @@ -582,7 +586,7 @@ public class ErnpRestClient implements IErnpClient { if (!alreadyExist) { // check eIDAS documents already contains a document with this pair of country-code and attribute-name - Optional<Eidas> oneDocWithNameExists = ernpPersonToKitt.getEidas().stream() + Optional<Eidas> oneDocWithNameExists = currentEidasDocs.stream() .filter(el -> el.getStaatscode2().equals(citizenCountryCode) && el.getArt().equals(attrName)) .findAny(); |