Consistently don't import Id/Key/NameKey/Entry types
These are often ambiguous without their containing class, not to mention used inconsistently within single class files. Implement a consistent policy. After this change there are exactly two remaining: $ find . -name \*.java | sort | xargs pcregrep '^import.*\.[A-Z][^.]*\.(NameKey|Key|Id|Entry);' ./java/com/google/gerrit/httpd/CacheBasedWebSession.java:import com.google.gerrit.httpd.WebSessionManager.Key; ./javatests/com/google/gerrit/server/change/ChangeKindCacheImplTest.java:import com.google.gerrit.server.change.ChangeKindCacheImpl.Key; These are corner cases of a specific cache implementation where the Key type is less ambiguous, and the full name is long. Change-Id: I1d2e9eb6c7dec0d09ca42b41dc252786d2024a5a
This commit is contained in:
@@ -71,7 +71,6 @@ import com.google.gerrit.index.IndexConfig;
|
||||
import com.google.gerrit.index.Schema;
|
||||
import com.google.gerrit.lifecycle.LifecycleManager;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Account.Id;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.Patch;
|
||||
@@ -2424,7 +2423,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
return this;
|
||||
}
|
||||
|
||||
DashboardChangeState draftAndDeleteCommentBy(Id commenterId) {
|
||||
DashboardChangeState draftAndDeleteCommentBy(Account.Id commenterId) {
|
||||
deleteDraftCommentBy.add(commenterId);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user