Make GeneratedMessageLite.isInitialized(T message, boolean shouldMemoize) private

It's not used by generated code, contrary to the comment.

The 2-arg version of the method was used in gencode for one day (2025-04-08 through 09): cl/90574926 to cl/90648831.

PiperOrigin-RevId: 688268752
pull/18928/head
Mark Hansen 3 months ago committed by Copybara-Service
parent 6935e10f38
commit 84a4472a0f
  1. 8
      java/core/src/main/java/com/google/protobuf/GeneratedMessageLite.java

@ -1455,12 +1455,8 @@ public abstract class GeneratedMessageLite<
return (GeneratedExtension<MessageType, T>) extension;
}
/**
* A static helper method for checking if a message is initialized, optionally memoizing.
*
* <p>For use by generated code only.
*/
protected static final <T extends GeneratedMessageLite<T, ?>> boolean isInitialized(
/** A static helper method for checking if a message is initialized, optionally memoizing. */
private static final <T extends GeneratedMessageLite<T, ?>> boolean isInitialized(
T message, boolean shouldMemoize) {
byte memoizedIsInitialized =
(Byte) message.dynamicMethod(MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED, null, null);

Loading…
Cancel
Save