diff options
author | 2017-08-10 21:00:52 +0200 | |
---|---|---|
committer | 2017-08-11 12:56:21 +0200 | |
commit | 523b575ac706607bcceb265f8041b502d4441968 (patch) | |
tree | 6087feb7b7165bc251a433348ca924a15db0881d | |
parent | e7e7ba4d6f250899165bb8862fefa4e90a33da57 (diff) |
Use Maps#newHashMapWithExpectedSize rather than improper HashMap ctor usage.
RELNOTES: None
PiperOrigin-RevId: 164884056
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java index f68fb30465..84313ae534 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java +++ b/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java @@ -479,7 +479,7 @@ public class SkyQueryEnvironment extends AbstractBlazeQueryEnvironment<Target> @Override public ThreadSafeMutableSet<Target> getFwdDeps(Iterable<Target> targets) throws InterruptedException { - Map<SkyKey, Target> targetsByKey = new HashMap<>(Iterables.size(targets)); + Map<SkyKey, Target> targetsByKey = Maps.newHashMapWithExpectedSize(Iterables.size(targets)); for (Target target : targets) { targetsByKey.put(TARGET_TO_SKY_KEY.apply(target), target); } |