diff --git a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/Identifier.java b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/Identifier.java index 9575752..4f5980b 100644 --- a/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/Identifier.java +++ b/src/main/java/com/sitepark/ies/userrepository/core/domain/entity/Identifier.java @@ -96,7 +96,7 @@ public boolean equals(Object o) { @Override public String toString() { if (this.id != null) { - return this.id.toString(); + return this.id; } return this.anchor.toString(); } diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/AccessTokenTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/AccessTokenTest.java index 74b0ecc..1dcfa32 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/AccessTokenTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/AccessTokenTest.java @@ -21,9 +21,14 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; @SuppressWarnings("PMD.TooManyMethods") +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL" +}) class AccessTokenTest { private static final ZoneId ZONE_ID = ZoneId.of( "Europe/Berlin" ); diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/IdentifierTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/IdentifierTest.java index 3c9414a..aec63e5 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/IdentifierTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/IdentifierTest.java @@ -7,8 +7,13 @@ import org.junit.jupiter.api.Test; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL" +}) class IdentifierTest { @Test diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/RoleTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/RoleTest.java index bb56362..8acf465 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/RoleTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/RoleTest.java @@ -11,6 +11,10 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL" +}) class RoleTest { private static final String TEST_ROLE_NAME = "ADMINISTRATOR"; diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserTest.java index bbd4a36..971d61e 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserTest.java @@ -20,6 +20,7 @@ import com.sitepark.ies.userrepository.core.domain.entity.role.Ref; import com.sitepark.ies.userrepository.core.domain.entity.role.UserLevelRoles; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; @SuppressWarnings({ @@ -27,6 +28,11 @@ "PMD.TooManyMethods", "PMD.GodClass" }) +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL", + "NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS" +}) class UserTest { private static Identity TEST_IDENTITY = LdapIdentity.builder() diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidityTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidityTest.java index 8e442b7..dab4d71 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidityTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/UserValidityTest.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; @SuppressWarnings({ @@ -26,6 +27,10 @@ "PMD.AvoidDuplicateLiterals", "PMD.TooManyMethods" }) +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL" +}) class UserValidityTest { private static final ZoneId ZONE_ID = ZoneId.of( "Europe/Berlin" ); diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentityTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentityTest.java index f353d4b..fd59a15 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentityTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/identity/LdapIdentityTest.java @@ -11,9 +11,14 @@ import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; @SuppressWarnings("PMD.TooManyMethods") +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL" +}) class LdapIdentityTest { private static final String USER_DN = "userdn"; diff --git a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/role/RefTest.java b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/role/RefTest.java index 96a15ed..1adfe3a 100644 --- a/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/role/RefTest.java +++ b/src/test/java/com/sitepark/ies/userrepository/core/domain/entity/role/RefTest.java @@ -9,8 +9,13 @@ import com.sitepark.ies.userrepository.core.domain.entity.Anchor; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import nl.jqno.equalsverifier.EqualsVerifier; +@SuppressFBWarnings({ + "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES", + "NP_NULL_PARAM_DEREF_NONVIRTUAL" +}) class RefTest { @Test