update guava list to string type
This commit is contained in:
parent
fdc96b05cf
commit
4e12f7b87b
|
@ -42,7 +42,7 @@ public class CoreJavaCollectionsUnitTest {
|
|||
@Test(expected = UnsupportedOperationException.class)
|
||||
public final void givenUsingGuavaBuilder_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() {
|
||||
final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three"));
|
||||
final ImmutableList<Object> unmodifiableList = ImmutableList.builder().addAll(list).build();
|
||||
final ImmutableList<String> unmodifiableList = ImmutableList.<String>builder().addAll(list).build();
|
||||
unmodifiableList.add("four");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue