ASF Bugzilla – Attachment 14927 Details for
Bug 34720
[Patch] alternate implementation for user.equals()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix
34720.patch (text/plain), 1.48 KB, created by
Maxim Wasiliev
on 2005-05-04 13:33:07 UTC
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Maxim Wasiliev
Created:
2005-05-04 13:33:07 UTC
Size:
1.48 KB
patch
obsolete
>Index: src/java/org/apache/lenya/ac/Identity.java >=================================================================== >--- src/java/org/apache/lenya/ac/Identity.java (revision 168108) >+++ src/java/org/apache/lenya/ac/Identity.java (working copy) >@@ -136,7 +136,7 @@ > if (identifiables[i] instanceof User) { > User user = (User) identifiables[i]; > User otherUser = manager.getUserManager().getUser(user.getId()); >- belongs = belongs && user == otherUser; >+ belongs = belongs && user.equals(otherUser); > } > i++; > } >Index: src/java/org/apache/lenya/ac/file/FileUser.java >=================================================================== >--- src/java/org/apache/lenya/ac/file/FileUser.java (revision 168108) >+++ src/java/org/apache/lenya/ac/file/FileUser.java (working copy) >@@ -201,5 +201,19 @@ > assert (configurationDirectory != null) && configurationDirectory.isDirectory(); > this.configurationDirectory = configurationDirectory; > } >- >+ >+ /** >+ * @see java.lang.Object#equals(Object) >+ */ >+ public boolean equals(Object otherObject) { >+ boolean equals = false; >+ >+ if (getClass().isInstance(otherObject)) { >+ FileUser other = (FileUser) otherObject; >+ equals = (getConfigurationDirectory().equals(other.getConfigurationDirectory()) && >+ getId().equals(other.getId())); >+ } >+ >+ return equals; >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34720
: 14927