diff options
4 files changed, 19 insertions, 27 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/BazelMain.java b/src/main/java/com/google/devtools/build/lib/bazel/BazelMain.java index 4ccdf3f5e3..c32e3835ef 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/BazelMain.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/BazelMain.java @@ -20,7 +20,6 @@ import com.google.devtools.build.lib.runtime.BlazeModule; import com.google.devtools.build.lib.runtime.BlazeRuntime; import java.io.IOException; import java.io.InputStream; -import java.util.List; import java.util.Properties; /** @@ -36,7 +35,7 @@ public final class BazelMain { * <p>Example: To make the "standalone" execution strategy the default for spawns, put it after * all the other modules that provider spawn strategies (e.g. WorkerModule and SandboxModule). */ - public static final List<Class<? extends BlazeModule>> BAZEL_MODULES = + public static final ImmutableList<Class<? extends BlazeModule>> BAZEL_MODULES = ImmutableList.of( com.google.devtools.build.lib.runtime.mobileinstall.MobileInstallModule.class, com.google.devtools.build.lib.bazel.BazelWorkspaceStatusModule.class, diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java index 1fbc07dbf1..eeacba5ad7 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java +++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java @@ -445,24 +445,19 @@ public class RuleClass { } } - /** - * List of required attributes for normal rules, name and type. - */ - public static final List<Attribute> REQUIRED_ATTRIBUTES_FOR_NORMAL_RULES = ImmutableList.of( - attr("tags", Type.STRING_LIST).build() - ); - - /** - * List of required attributes for test rules, name and type. - */ - public static final List<Attribute> REQUIRED_ATTRIBUTES_FOR_TESTS = ImmutableList.of( - attr("tags", Type.STRING_LIST).build(), - attr("size", Type.STRING).build(), - attr("timeout", Type.STRING).build(), - attr("flaky", Type.BOOLEAN).build(), - attr("shard_count", Type.INTEGER).build(), - attr("local", Type.BOOLEAN).build() - ); + /** List of required attributes for normal rules, name and type. */ + public static final ImmutableList<Attribute> REQUIRED_ATTRIBUTES_FOR_NORMAL_RULES = + ImmutableList.of(attr("tags", Type.STRING_LIST).build()); + + /** List of required attributes for test rules, name and type. */ + public static final ImmutableList<Attribute> REQUIRED_ATTRIBUTES_FOR_TESTS = + ImmutableList.of( + attr("tags", Type.STRING_LIST).build(), + attr("size", Type.STRING).build(), + attr("timeout", Type.STRING).build(), + attr("flaky", Type.BOOLEAN).build(), + attr("shard_count", Type.INTEGER).build(), + attr("local", Type.BOOLEAN).build()); private String name; private final RuleClassType type; diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Lexer.java b/src/main/java/com/google/devtools/build/lib/syntax/Lexer.java index 5135dd3573..d7ee319b5e 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/Lexer.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/Lexer.java @@ -44,7 +44,7 @@ public final class Lexer { // Characters that can come immediately prior to an '=' character to generate // a different token - private static final Map<Character, TokenKind> EQUAL_TOKENS = + private static final ImmutableMap<Character, TokenKind> EQUAL_TOKENS = ImmutableMap.<Character, TokenKind>builder() .put('=', TokenKind.EQUALS_EQUALS) .put('!', TokenKind.NOT_EQUALS) diff --git a/src/test/java/com/google/devtools/build/lib/runtime/TestSummaryTest.java b/src/test/java/com/google/devtools/build/lib/runtime/TestSummaryTest.java index 6ad3336b39..6619d1f3d5 100644 --- a/src/test/java/com/google/devtools/build/lib/runtime/TestSummaryTest.java +++ b/src/test/java/com/google/devtools/build/lib/runtime/TestSummaryTest.java @@ -38,7 +38,9 @@ import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem; import com.google.devtools.build.lib.view.test.TestStatus.BlazeTestStatus; import com.google.devtools.build.lib.view.test.TestStatus.FailedTestCasesStatus; import com.google.devtools.build.lib.view.test.TestStatus.TestCase; - +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -46,10 +48,6 @@ import org.junit.runners.JUnit4; import org.mockito.InOrder; import org.mockito.Mockito; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - @RunWith(JUnit4.class) public class TestSummaryTest { @@ -57,7 +55,7 @@ public class TestSummaryTest { private static final String PATH = "package"; private static final String TARGET_NAME = "name"; private ConfiguredTarget stubTarget; - private static final List<Long> SMALL_TIMING = ImmutableList.of(1L, 2L, 3L, 4L); + private static final ImmutableList<Long> SMALL_TIMING = ImmutableList.of(1L, 2L, 3L, 4L); private static final int CACHED = SMALL_TIMING.size(); private static final int NOT_CACHED = 0; |