diff options
author | tomlu <tomlu@google.com> | 2017-11-08 20:12:47 +0100 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2017-11-09 18:29:06 +0100 |
commit | a155b536cb8032feaf2710677d2bdab4b2b43c96 (patch) | |
tree | 793ab3da054e3dc26e6fb00d1fd2fa7793b6799b /src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java | |
parent | 743ea216879dd0e3037d4b34eff92ba8af493554 (diff) |
Replace all usages of Blaze's Preconditions class with guava.
Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own.
This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually.
PiperOrigin-RevId: 175033526
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java b/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java index bb890cbe59..6ec3340465 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java +++ b/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java @@ -17,13 +17,13 @@ package com.google.devtools.build.lib.packages; import static com.google.devtools.build.lib.packages.BuildType.TRISTATE; import static com.google.devtools.build.lib.syntax.Type.BOOLEAN; +import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.syntax.Type; import com.google.devtools.build.lib.util.Pair; -import com.google.devtools.build.lib.util.Preconditions; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; |