tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1607944 - /tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
Date Fri, 04 Jul 2014 21:41:07 GMT
Author: rmannibucau
Date: Fri Jul  4 21:41:07 2014
New Revision: 1607944

URL: http://svn.apache.org/r1607944
Log:
equals/hashcode for User

Modified:
    tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java?rev=1607944&r1=1607943&r2=1607944&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
(original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
Fri Jul  4 21:41:07 2014
@@ -461,5 +461,24 @@ public abstract class AbstractSecuritySe
         public String getName() {
             return name;
         }
+
+        @Override
+        public boolean equals(final Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (o == null || getClass() != o.getClass()) {
+                return false;
+            }
+
+            final User user = User.class.cast(o);
+            return !(name != null ? !name.equals(user.name) : user.name != null);
+
+        }
+
+        @Override
+        public int hashCode() {
+            return name != null ? name.hashCode() : 0;
+        }
     }
 }



Mime
View raw message