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:
@@ -50,7 +50,6 @@ import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@@ -190,7 +189,7 @@ public class ReviewerRecommender {
|
||||
}
|
||||
|
||||
// Sort results
|
||||
Stream<Entry<Account.Id, MutableDouble>> sorted =
|
||||
Stream<Map.Entry<Account.Id, MutableDouble>> sorted =
|
||||
reviewerScores
|
||||
.entrySet()
|
||||
.stream()
|
||||
|
||||
Reference in New Issue
Block a user