diff --git a/transpiler/java/com/google/j2cl/transpiler/ast/RuntimeMethods.java b/transpiler/java/com/google/j2cl/transpiler/ast/RuntimeMethods.java index 612a56a085..064c2b0de6 100644 --- a/transpiler/java/com/google/j2cl/transpiler/ast/RuntimeMethods.java +++ b/transpiler/java/com/google/j2cl/transpiler/ast/RuntimeMethods.java @@ -18,6 +18,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.j2cl.common.StringUtils.capitalize; +import static java.util.Arrays.asList; +import static java.util.Arrays.stream; import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableList; @@ -25,7 +27,6 @@ import com.google.j2cl.common.SourcePosition; import com.google.j2cl.transpiler.ast.MethodDescriptor.ParameterDescriptor; import com.google.j2cl.transpiler.ast.TypeDescriptors.BootstrapType; -import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.OptionalInt; @@ -58,7 +59,7 @@ public static MethodCall createKClassCall(Expression expression) { /** Create a call to an Arrays method. */ public static MethodCall createArraysMethodCall(String methodName, Expression... arguments) { - return createArraysMethodCall(methodName, Arrays.asList(arguments)); + return createArraysMethodCall(methodName, asList(arguments)); } /** Create a call to an Arrays method. */ @@ -280,7 +281,7 @@ public static Expression createEnumsMethodCall(String unbox, Expression... argum /** Create a call to an Equality method. */ public static MethodCall createEqualityMethodCall(String methodName, Expression... arguments) { - return createEqualityMethodCall(methodName, Arrays.asList(arguments)); + return createEqualityMethodCall(methodName, asList(arguments)); } /** Create a call to an Equality method. */ @@ -293,7 +294,7 @@ public static MethodCall createEqualityMethodCall(String methodName, List ParameterDescriptor.newBuilder().setTypeDescriptor(p).build()) .toArray(ParameterDescriptor[]::new)); }