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 20
20
import com .google .common .collect .ImmutableList ;
21
21
import com .google .protobuf .ByteString ;
22
22
import com .google .protobuf .LazyStringArrayList ;
23
- import com .google .protobuf .UnmodifiableLazyStringList ;
24
23
import java .io .ByteArrayInputStream ;
25
24
import java .io .ByteArrayOutputStream ;
26
25
import java .io .IOException ;
@@ -109,14 +108,16 @@ public void compareTest() {
109
108
110
109
@ Test
111
110
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 ();
115
116
List [] labelLists = {
116
117
Arrays .asList ("str1" , "str2" , "str3" ),
117
118
ImmutableList .of ("string1" , "string2" ),
118
- new UnmodifiableLazyStringList ( lazyList ) ,
119
- new UnmodifiableLazyStringList ( LazyStringArrayList . EMPTY )
119
+ lazyListNonEmpty ,
120
+ lazyListEmpty
120
121
};
121
122
122
123
for (int i = 0 ; i < labelLists .length ; i ++) {
You can’t perform that action at this time.
0 commit comments