diff --git a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/User.java b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/User.java index 87de7a9..304e903 100644 --- a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/User.java +++ b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/User.java @@ -178,17 +178,9 @@ public final boolean equals(Object o) { @Override public String toString() { - return new StringBuilder() - .append(this.getName()) - .append(" (") - .append("login: ").append(this.login) - .append(", ") - .append("id: ").append(this.id) - .append(", ") - .append("anchor: ").append(this.anchor) - .append(", ") - .append("roleList: ").append(this.roleList) - .append(')').toString(); + return "User [id=" + id + ", anchor=" + anchor + ", login=" + login + ", firstname=" + firstname + ", lastname=" + + lastname + ", email=" + email + ", gender=" + gender + ", note=" + note + ", validity=" + validity + + ", identityList=" + identityList + ", roleList=" + roleList + "]"; } @SuppressWarnings("PMD.TooManyMethods") diff --git a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidity.java b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidity.java index 5c1bf2e..e9aa3a3 100644 --- a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidity.java +++ b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidity.java @@ -111,13 +111,7 @@ public final boolean equals(Object o) { @Override public String toString() { - return new StringBuilder() - .append("blocked: ").append(this.blocked) - .append(", ") - .append("validFrom: ").append(this.validFrom) - .append(", ") - .append("validTo: ").append(this.validTo) - .toString(); + return "UserValidity [blocked=" + blocked + ", validFrom=" + validFrom + ", validTo=" + validTo + "]"; } @JsonPOJOBuilder(withPrefix = "", buildMethodName = "build") diff --git a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentity.java b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentity.java index 3fc2cab..c11f8c6 100644 --- a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentity.java +++ b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentity.java @@ -46,6 +46,11 @@ public final int hashCode() { return hash; } + @Override + public String toString() { + return "LdapIdentity [server=" + server + ", dn=" + dn + "]"; + } + @Override public final boolean equals(Object o) {