File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 2020import com .google .common .collect .ImmutableList ;
2121import com .google .protobuf .ByteString ;
2222import com .google .protobuf .LazyStringArrayList ;
23- import com .google .protobuf .UnmodifiableLazyStringList ;
2423import java .io .ByteArrayInputStream ;
2524import java .io .ByteArrayOutputStream ;
2625import java .io .IOException ;
@@ -109,14 +108,16 @@ public void compareTest() {
109108
110109 @ Test
111110 public void testSerialization () throws IOException , ClassNotFoundException {
112- LazyStringArrayList lazyList = new LazyStringArrayList ();
113- lazyList .add ("lazy" );
114- lazyList .add ("very lazy" );
111+ LazyStringArrayList lazyListNonEmpty =
112+ new LazyStringArrayList (ImmutableList .of ("lazy" , "very lazy" ));
113+ lazyListNonEmpty .makeImmutable ();
114+ LazyStringArrayList lazyListEmpty = LazyStringArrayList .emptyList ();
115+ lazyListEmpty .makeImmutable ();
115116 List [] labelLists = {
116117 Arrays .asList ("str1" , "str2" , "str3" ),
117118 ImmutableList .of ("string1" , "string2" ),
118- new UnmodifiableLazyStringList ( lazyList ) ,
119- new UnmodifiableLazyStringList ( LazyStringArrayList . EMPTY )
119+ lazyListNonEmpty ,
120+ lazyListEmpty
120121 };
121122
122123 for (int i = 0 ; i < labelLists .length ; i ++) {
You can’t perform that action at this time.
0 commit comments