From 401301c0d91491ee0b05b1fad65c53b1ad6f67c5 Mon Sep 17 00:00:00 2001 From: mstasgravitee Date: Fri, 14 Jun 2024 11:54:18 +0200 Subject: [PATCH] fix: override equals and hashcode for SecretLocation --- .../node/api/secrets/model/SecretLocation.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gravitee-node-api/src/main/java/io/gravitee/node/api/secrets/model/SecretLocation.java b/gravitee-node-api/src/main/java/io/gravitee/node/api/secrets/model/SecretLocation.java index 5df8ceff5..94586f3ea 100644 --- a/gravitee-node-api/src/main/java/io/gravitee/node/api/secrets/model/SecretLocation.java +++ b/gravitee-node-api/src/main/java/io/gravitee/node/api/secrets/model/SecretLocation.java @@ -44,4 +44,17 @@ public T getOrDefault(String key, String defaultValue) { Objects.requireNonNull(key); return (T) properties.getOrDefault(key, defaultValue); } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SecretLocation that = (SecretLocation) o; + return Objects.equals(properties, that.properties); + } + + @Override + public int hashCode() { + return Objects.hashCode(properties); + } }