From c658e27529ccf4a000724ab3622f1b807c85449b Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 13 Dec 2022 16:22:46 -0800 Subject: [PATCH] Make emptyList public and mark the public EMPTY field as deprecated. PiperOrigin-RevId: 495154966 --- .../java/com/google/protobuf/LazyStringArrayList.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java b/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java index a2de6f9cfe..fdf39e3498 100644 --- a/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java +++ b/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java @@ -67,12 +67,17 @@ public class LazyStringArrayList extends AbstractProtobufList EMPTY_LIST.makeImmutable(); } - static LazyStringArrayList emptyList() { + /** Returns an empty immutable {@code LazyStringArrayList} instance */ + public static LazyStringArrayList emptyList() { return EMPTY_LIST; } - // For compatibility with older runtimes. - public static final LazyStringList EMPTY = EMPTY_LIST; + /** + * For compatibility with older runtimes. + * + * @deprecated use {@link emptyList()} instead + */ + @Deprecated public static final LazyStringList EMPTY = EMPTY_LIST; private final List list;