aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-03-14 10:57:43 +0000
committerGravatar Yun Peng <pcloudy@google.com>2017-03-14 19:45:47 +0000
commit7807b6c897c0f8160ac7705db044b27207aca75a (patch)
tree5e9097dca3a87520422d9da463790ea882059a94 /src
parent69eb9f53108b1071cef5335a086697b3daf2e509 (diff)
Global cleanup change.
-- PiperOrigin-RevId: 150051360 MOS_MIGRATED_REVID=150051360
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/BazelMain.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/RuleClass.java31
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/Lexer.java2
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/TestSummaryTest.java10
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;