diff options
author | Googler <noreply@google.com> | 2017-03-03 00:29:04 +0000 |
---|---|---|
committer | Yue Gan <yueg@google.com> | 2017-03-03 10:38:42 +0000 |
commit | 79fbcd2f1a657e90ed7345e821146f6ad96566f1 (patch) | |
tree | 6a9210360102fccf97fce6d7d961f80d25ba91c0 /src/main/java/com/google/devtools | |
parent | 65a9bc9a79a660291210719862bc194a87311943 (diff) |
Global cleanup change.
--
PiperOrigin-RevId: 149061874
MOS_MIGRATED_REVID=149061874
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java | 8 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/FancyTerminalEventHandler.java | 12 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java index d92f819027..54ca40ee8e 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/sh/BazelShRuleClasses.java @@ -28,10 +28,7 @@ import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.packages.RuleClass.Builder; import com.google.devtools.build.lib.packages.RuleClass.Builder.RuleClassType; import com.google.devtools.build.lib.util.FileTypeSet; - import java.util.Collection; -import java.util.Map; - import javax.annotation.Nullable; /** @@ -105,12 +102,11 @@ public final class BazelShRuleClasses { */ static final String SYSTEM_BASH_VERSION = "system"; - static final Map<String, BashBinaryBinding> BASH_BINARY_BINDINGS = + static final ImmutableMap<String, BashBinaryBinding> BASH_BINARY_BINDINGS = ImmutableMap.of( // "system": don't package any bash with the target, but rather use whatever is // available on the system the script is run on. - SYSTEM_BASH_VERSION, new BashBinaryBinding("/bin/bash") - ); + SYSTEM_BASH_VERSION, new BashBinaryBinding("/bin/bash")); static final String DEFAULT_BASH_VERSION = SYSTEM_BASH_VERSION; diff --git a/src/main/java/com/google/devtools/build/lib/runtime/FancyTerminalEventHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/FancyTerminalEventHandler.java index 1c0ad1f95e..07234d5ef3 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/FancyTerminalEventHandler.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/FancyTerminalEventHandler.java @@ -25,19 +25,15 @@ import com.google.devtools.build.lib.util.io.AnsiTerminalWriter; import com.google.devtools.build.lib.util.io.LineCountingAnsiTerminalWriter; import com.google.devtools.build.lib.util.io.LineWrappingAnsiTerminalWriter; import com.google.devtools.build.lib.util.io.OutErr; - -import org.joda.time.Duration; -import org.joda.time.Instant; - import java.io.IOException; import java.util.Calendar; import java.util.Iterator; -import java.util.List; -import java.util.Set; import java.util.concurrent.ThreadLocalRandom; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.joda.time.Duration; +import org.joda.time.Instant; /** * An event handler for ANSI terminals which uses control characters to @@ -71,7 +67,7 @@ public class FancyTerminalEventHandler extends BlazeCommandEventHandler { // [1,442 / 23,476] Compiling base/base.cc "^\\[(?:(?:\\d\\d?\\d?%)|(?:[\\d+,]+ / [\\d,]+))\\] "); private static final Splitter LINEBREAK_SPLITTER = Splitter.on('\n'); - private static final List<String> SPECIAL_MESSAGES = + private static final ImmutableList<String> SPECIAL_MESSAGES = ImmutableList.of( "Reading startup options from " + "HKEY_LOCAL_MACHINE\\Software\\Google\\Devtools\\CurrentVersion", @@ -98,7 +94,7 @@ public class FancyTerminalEventHandler extends BlazeCommandEventHandler { "Searching for cellular signal", "Waiting for workstation CPU temperature to decrease"); - private static final Set<Character> PUNCTUATION_CHARACTERS = + private static final ImmutableSet<Character> PUNCTUATION_CHARACTERS = ImmutableSet.<Character>of(',', '.', ':', '?', '!', ';'); private final Iterator<String> messageIterator = Iterators.cycle(SPECIAL_MESSAGES); |