Skip to content

Commit d1b0acf

Browse files
chore: Use LazyStringArrayList (#2304)
* chore: Use LazyStringArrayList * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update to use LazyStringArrayList.emptyList() --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7c70df9 commit d1b0acf

File tree

1 file changed

+7
-6
lines changed
  • google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models

1 file changed

+7
-6
lines changed

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowCellTest.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.google.common.collect.ImmutableList;
2121
import com.google.protobuf.ByteString;
2222
import com.google.protobuf.LazyStringArrayList;
23-
import com.google.protobuf.UnmodifiableLazyStringList;
2423
import java.io.ByteArrayInputStream;
2524
import java.io.ByteArrayOutputStream;
2625
import 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++) {

0 commit comments

Comments
 (0)