Automated rollback of commit 2a55706f9d.

PiperOrigin-RevId: 569253919
pull/14227/head
Sandy Zhang 1 year ago committed by Copybara-Service
parent 49f2388bf3
commit 30b6251dea
  1. 6
      java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java

@ -2459,7 +2459,11 @@ public abstract class GeneratedMessageV3 extends AbstractMessage implements Seri
final String containingOneofCamelCaseName) {
isOneofField =
descriptor.getRealContainingOneof() != null;
hasHasMethod = descriptor.hasPresence();
hasHasMethod =
descriptor.getFile().getSyntax() == FileDescriptor.Syntax.EDITIONS && descriptor.hasPresence()
|| descriptor.getFile().getSyntax() == FileDescriptor.Syntax.PROTO2
|| descriptor.hasOptionalKeyword()
|| (!isOneofField && descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE);
ReflectionInvoker reflectionInvoker =
new ReflectionInvoker(
descriptor,

Loading…
Cancel
Save