portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pernoud Aurelien" <apern...@sopragroup.com>
Subject RE: cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/om/registry/base BaseSecurityAccess.java
Date Thu, 06 Nov 2003 08:17:02 GMT

weaver@apache.org a écrit :


>     * Interface for manipulatin the Security Access on the registry
>   entries @@ -93,38 +94,38 @@
>         */
>        public boolean equals(Object object)
>        {
>   -        if (object == null)
>   +        if (object == null || (object instanceof SecurityAccess)) 
>            {
>               return false;
>            }
> 
>   -        BaseSecurityAccess obj = (BaseSecurityAccess) object;
>   +        SecurityAccess obj = (SecurityAccess) object;

I have no idea what this is supposed to do, but I don't get the test...
You test if 'object' is an instance of securityacess and return false, and if it isn't you
try to cast it as a securityaccess ?
Shouldn't it be a "not instance of SecurityAccess" :
+        if (object == null || !(object instanceof SecurityAccess)) 

Again, I just looked the code, I don't know what this is supposed to do so I might really
be wrong, I was just wondering :)

Aurelien

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message