summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcater <jcater@google.com>2018-04-20 04:04:06 -0700
committerIvan Gavrilovic <gavra@google.com>2018-05-04 10:41:19 +0100
commit72ad6666b99ce7f2bc604cb25515fd0f41b56d60 (patch)
treee035024479e1419e2a17a06ed35b9d566b60a0e1
parent59370640f451cdb9b18472324f4234c0dc184755 (diff)
downloaddesugar-72ad6666b99ce7f2bc604cb25515fd0f41b56d60.tar.gz
Remove use of bare Immutable{List,Map,Set} Builder classes.
Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193649193 GitOrigin-RevId: 96d3c91c714544584c9174759bedebf2a6be5e71 Change-Id: I0c9cf0ab619bc743cd15ba63ad7355e008c0f1d1
-rw-r--r--java/com/google/devtools/build/android/Converters.java3
-rw-r--r--java/com/google/devtools/common/options/processor/OptionProcessor.java6
2 files changed, 4 insertions, 5 deletions
diff --git a/java/com/google/devtools/build/android/Converters.java b/java/com/google/devtools/build/android/Converters.java
index 13911f9..5e89db2 100644
--- a/java/com/google/devtools/build/android/Converters.java
+++ b/java/com/google/devtools/build/android/Converters.java
@@ -19,7 +19,6 @@ import com.android.manifmerger.ManifestMerger2.MergeType;
import com.android.repository.Revision;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableList.Builder;
import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.android.aapt2.CompiledResources;
import com.google.devtools.build.android.aapt2.StaticLibrary;
@@ -423,7 +422,7 @@ public final class Converters {
@Override
public List<StaticLibrary> convert(String input) throws OptionsParsingException {
- final Builder<StaticLibrary> builder = ImmutableList.<StaticLibrary>builder();
+ final ImmutableList.Builder<StaticLibrary> builder = ImmutableList.<StaticLibrary>builder();
for (String path : SPLITTER.splitToList(input)) {
builder.add(libraryConverter.convert(path));
}
diff --git a/java/com/google/devtools/common/options/processor/OptionProcessor.java b/java/com/google/devtools/common/options/processor/OptionProcessor.java
index 5190053..0f1989c 100644
--- a/java/com/google/devtools/common/options/processor/OptionProcessor.java
+++ b/java/com/google/devtools/common/options/processor/OptionProcessor.java
@@ -15,7 +15,6 @@ package com.google.devtools.common.options.processor;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMap.Builder;
import com.google.devtools.common.options.Converter;
import com.google.devtools.common.options.Converters;
import com.google.devtools.common.options.ExpansionFunction;
@@ -96,11 +95,12 @@ public final class OptionProcessor extends AbstractProcessor {
// Because of the discrepancies between the java.lang and javax.lang type models, we can't
// directly use the get() method for the default converter map. Instead, we'll convert it once,
// to be more usable, and with the boxed type return values of convert() as the keys.
- ImmutableMap.Builder<TypeMirror, Converter<?>> converterMapBuilder = new Builder<>();
+ ImmutableMap.Builder<TypeMirror, Converter<?>> converterMapBuilder =
+ new ImmutableMap.Builder<>();
// Create a link from the primitive Classes to their primitive types. This intentionally
// only contains the types in the DEFAULT_CONVERTERS map.
- ImmutableMap.Builder<Class<?>, PrimitiveType> builder = new Builder<>();
+ ImmutableMap.Builder<Class<?>, PrimitiveType> builder = new ImmutableMap.Builder<>();
builder.put(int.class, typeUtils.getPrimitiveType(TypeKind.INT));
builder.put(double.class, typeUtils.getPrimitiveType(TypeKind.DOUBLE));
builder.put(boolean.class, typeUtils.getPrimitiveType(TypeKind.BOOLEAN));