diff options
Diffstat (limited to 'java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java')
-rw-r--r-- | java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java b/java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java index 0f42ac50..2fc3124d 100644 --- a/java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java +++ b/java/core/src/test/java/com/google/protobuf/LazyStringArrayListTest.java @@ -32,12 +32,12 @@ package com.google.protobuf; import static java.util.Arrays.asList; -import junit.framework.TestCase; - import java.util.ArrayList; +import java.util.Collections; import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.List; +import junit.framework.TestCase; /** * Tests for {@link LazyStringArrayList}. @@ -233,7 +233,7 @@ public class LazyStringArrayListTest extends TestCase { } try { - list.addAllByteArray(asList(BYTE_STRING_A.toByteArray())); + list.addAllByteArray(Collections.singletonList(BYTE_STRING_A.toByteArray())); fail(); } catch (UnsupportedOperationException e) { // expected @@ -281,6 +281,7 @@ public class LazyStringArrayListTest extends TestCase { assertGenericListImmutable(byteArrayList, byteArrayList.get(0)); } + @SuppressWarnings("unchecked") private static <T> void assertGenericListImmutable(List<T> list, T value) { try { list.add(value); |