This is an automated email from the ASF dual-hosted git repository.

karan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 93fac4d0376 Adding equals and hashcode impl for access (#17643)
93fac4d0376 is described below

commit 93fac4d03763755d341ade7d40404d24c6a6368d
Author: Karan Kumar <[email protected]>
AuthorDate: Mon Jan 20 07:24:22 2025 +0530

    Adding equals and hashcode impl for access (#17643)
---
 .../org/apache/druid/server/security/Access.java    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/server/src/main/java/org/apache/druid/server/security/Access.java 
b/server/src/main/java/org/apache/druid/server/security/Access.java
index 8e3564032c8..117191568f6 100644
--- a/server/src/main/java/org/apache/druid/server/security/Access.java
+++ b/server/src/main/java/org/apache/druid/server/security/Access.java
@@ -24,6 +24,7 @@ import org.apache.druid.java.util.common.StringUtils;
 import org.apache.druid.query.policy.Policy;
 
 import javax.annotation.Nullable;
+import java.util.Objects;
 import java.util.Optional;
 
 /**
@@ -136,4 +137,24 @@ public class Access
     return StringUtils.format("Allowed:%s, Message:%s, Policy: %s", allowed, 
message, policy);
   }
 
+  @Override
+  public boolean equals(Object o)
+  {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    Access access = (Access) o;
+    return allowed == access.allowed
+           && Objects.equals(message, access.message)
+           && Objects.equals(policy, access.policy);
+  }
+
+  @Override
+  public int hashCode()
+  {
+    return Objects.hash(allowed, message, policy);
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to