Changeset 30160

Show
Ignore:
Timestamp:
02/14/08 03:01:47 (9 months ago)
Author:
tdelprat
Message:

fix JAAS caching problem with SystemPrincipal? created from nuxeo-client

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.runtime/branches/1.4/nuxeo-runtime/src/main/java/org/nuxeo/runtime/api/login/LoginComponent.java

    r28156 r30160  
    229229        } 
    230230 
     231        @Override 
     232        public boolean equals(Object other) { 
     233            if (other instanceof Principal) { 
     234                if (userName == null) { 
     235                    return ((Principal) other).getName() == null; 
     236                } else { 
     237                    return userName.equals(((Principal) other).getName()); 
     238                } 
     239            } else { 
     240                return false; 
     241            } 
     242        } 
     243 
     244        @Override 
     245        public int hashCode() { 
     246            if (userName==null) 
     247                return 0; 
     248            else 
     249                return userName.hashCode(); 
     250        } 
     251 
    231252    } 
    232253