Remove unused CurrentUser#cacheKey method
Change-Id: If7ccfd9a418a379c677a7150fd14a7fc2d497cd5
This commit is contained in:
		| @@ -26,12 +26,6 @@ public class AnonymousUser extends CurrentUser { | ||||
|     return new ListGroupMembership(Collections.singleton(SystemGroupBackend.ANONYMOUS_USERS)); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public Object getCacheKey() { | ||||
|     // Treat all anonymous users as a single user | ||||
|     return "anonymous"; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public String toString() { | ||||
|     return "ANONYMOUS"; | ||||
|   | ||||
| @@ -90,12 +90,6 @@ public abstract class CurrentUser { | ||||
|    */ | ||||
|   public abstract GroupMembership getEffectiveGroups(); | ||||
|  | ||||
|   /** | ||||
|    * Returns a unique identifier for this user that is intended to be used as a cache key. Returned | ||||
|    * object should to implement {@code equals()} and {@code hashCode()} for effective caching. | ||||
|    */ | ||||
|   public abstract Object getCacheKey(); | ||||
|  | ||||
|   /** Unique name of the user on this server, if one has been assigned. */ | ||||
|   public Optional<String> getUserName() { | ||||
|     return Optional.empty(); | ||||
|   | ||||
| @@ -390,11 +390,6 @@ public class IdentifiedUser extends CurrentUser { | ||||
|     return effectiveGroups; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public Object getCacheKey() { | ||||
|     return getAccountId(); | ||||
|   } | ||||
|  | ||||
|   public PersonIdent newRefLogIdent() { | ||||
|     return newRefLogIdent(new Date(), TimeZone.getDefault()); | ||||
|   } | ||||
|   | ||||
| @@ -35,11 +35,6 @@ public class InternalUser extends CurrentUser { | ||||
|     return GroupMembership.EMPTY; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public String getCacheKey() { | ||||
|     return "internal"; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public boolean isInternalUser() { | ||||
|     return true; | ||||
|   | ||||
| @@ -40,11 +40,6 @@ public class PeerDaemonUser extends CurrentUser { | ||||
|     return GroupMembership.EMPTY; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public Object getCacheKey() { | ||||
|     return getRemoteAddress(); | ||||
|   } | ||||
|  | ||||
|   public SocketAddress getRemoteAddress() { | ||||
|     return peer; | ||||
|   } | ||||
|   | ||||
| @@ -36,9 +36,4 @@ public final class SingleGroupUser extends CurrentUser { | ||||
|   public GroupMembership getEffectiveGroups() { | ||||
|     return groups; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|   public Object getCacheKey() { | ||||
|     return groups.getKnownGroups(); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -100,11 +100,6 @@ public class UiActionsTest { | ||||
|           throw new UnsupportedOperationException("not implemented"); | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         public Object getCacheKey() { | ||||
|           return new Object(); | ||||
|         } | ||||
|  | ||||
|         @Override | ||||
|         public boolean isIdentifiedUser() { | ||||
|           return true; | ||||
|   | ||||
| @@ -1197,11 +1197,6 @@ public class RefControlTest { | ||||
|       return groups; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public Object getCacheKey() { | ||||
|       return new Object(); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public Optional<String> getUserName() { | ||||
|       return Optional.ofNullable(username); | ||||
|   | ||||
 Submodule plugins/replication updated: 293ee3590d...bc47d23873
									
								
							
		Reference in New Issue
	
	Block a user
	 Patrick Hiesel
					Patrick Hiesel