From 7807b6c897c0f8160ac7705db044b27207aca75a Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 14 Mar 2017 10:57:43 +0000 Subject: Global cleanup change. -- PiperOrigin-RevId: 150051360 MOS_MIGRATED_REVID=150051360 --- .../google/devtools/build/lib/bazel/BazelMain.java | 3 +-- .../devtools/build/lib/packages/RuleClass.java | 31 +++++++++------------- .../google/devtools/build/lib/syntax/Lexer.java | 2 +- .../build/lib/runtime/TestSummaryTest.java | 10 +++---- 4 files changed, 19 insertions(+), 27 deletions(-) (limited to 'src') 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 { *

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> BAZEL_MODULES = + public static final ImmutableList> 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 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 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 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 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 EQUAL_TOKENS = + private static final ImmutableMap EQUAL_TOKENS = ImmutableMap.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 SMALL_TIMING = ImmutableList.of(1L, 2L, 3L, 4L); + private static final ImmutableList SMALL_TIMING = ImmutableList.of(1L, 2L, 3L, 4L); private static final int CACHED = SMALL_TIMING.size(); private static final int NOT_CACHED = 0; -- cgit v1.2.3