diff options
author | 2017-05-07 01:03:35 -0400 | |
---|---|---|
committer | 2017-05-08 09:49:09 -0400 | |
commit | 33876789f80853baa8d4210628aa8eabf6c2513a (patch) | |
tree | de0dd89c56847d4ee9b9a937f32d42495cc1050a /src/main/java/com/google/devtools/build/lib/exec | |
parent | 909619aa9d14f8b92c1700c9f6ec4cae881245f0 (diff) |
Replace constants (static final CONSTANT_CASE) declaration type which use the general collection interface (e.g. List) with an immutable type (e.g. ImmutableList).
For constant field declarations, you should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List). This communicates to your callers important semantic guarantees ([]
For more info, see:[]
Cleanup change automatically generated by error-prone refactoring //third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns:MutableConstantField_refactoring on targets //third_party/bazel/...
PiperOrigin-RevId: 155305768
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/TestXmlOutputParser.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/TestXmlOutputParser.java b/src/main/java/com/google/devtools/build/lib/exec/TestXmlOutputParser.java index 277a87d37f..e10db69c3c 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/TestXmlOutputParser.java +++ b/src/main/java/com/google/devtools/build/lib/exec/TestXmlOutputParser.java @@ -14,12 +14,12 @@ package com.google.devtools.build.lib.exec; +import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.view.test.TestStatus.TestCase; import com.google.devtools.build.lib.view.test.TestStatus.TestCase.Type; import com.google.protobuf.UninitializedMessageException; import java.io.InputStream; -import java.util.Collection; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; @@ -31,7 +31,7 @@ import javax.xml.stream.XMLStreamReader; */ final class TestXmlOutputParser { // jUnit can use either "testsuites" or "testsuite". - private static final Collection<String> TOPLEVEL_ELEMENT_NAMES = + private static final ImmutableCollection<String> TOPLEVEL_ELEMENT_NAMES = ImmutableSet.of("testsuites", "testsuite"); public TestCase parseXmlIntoTestResult(InputStream xmlStream) |