From 76fcc8227de6375a6ae5e988acd368c2cf893516 Mon Sep 17 00:00:00 2001 From: Christian Kollmann Date: Thu, 4 Mar 2021 15:05:50 +0100 Subject: Refactor RegisterResult to make it immutable --- .../modules/auth/eidas/v2/dao/RegisterResult.java | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'eidas_modules') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/RegisterResult.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/RegisterResult.java index 4674751d..369a4e31 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/RegisterResult.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/RegisterResult.java @@ -24,30 +24,24 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2.dao; import at.gv.e_government.reference.namespace.persondata._20020228.PostalAddressType; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.ToString; +import lombok.Data; -@Getter -@NoArgsConstructor -@ToString -@EqualsAndHashCode +@Data public class RegisterResult { // MDS - private String pseudonym; - private String givenName; - private String familyName; - private String dateOfBirth; + private final String pseudonym; + private final String givenName; + private final String familyName; + private final String dateOfBirth; // additional attributes - private String placeOfBirth; - private String birthName; - private String taxNumber; - private PostalAddressType address; + private final String placeOfBirth; + private final String birthName; + private final String taxNumber; + private final PostalAddressType address; - private String bpk; + private final String bpk; /** * Register search result. @@ -64,6 +58,10 @@ public class RegisterResult { this.givenName = givenName; this.familyName = familyName; this.dateOfBirth = dateOfBirth; + this.placeOfBirth = null; + this.birthName = null; + this.taxNumber = null; + this.address = null; } /** -- cgit v1.2.3