Make emptyList public and mark the public EMPTY field as deprecated.

PiperOrigin-RevId: 495154966
pull/11292/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent bfed218c71
commit c658e27529
  1. 11
      java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java

@ -67,12 +67,17 @@ public class LazyStringArrayList extends AbstractProtobufList<String>
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<Object> list;

Loading…
Cancel
Save