We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 684a3de commit 2a55706Copy full SHA for 2a55706
java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java
@@ -2407,10 +2407,7 @@ public void clear(final GeneratedMessageV3.Builder<?> builder) {
2407
isOneofField =
2408
descriptor.getContainingOneof() != null
2409
&& !descriptor.getContainingOneof().isSynthetic();
2410
- hasHasMethod =
2411
- descriptor.getFile().getSyntax() == FileDescriptor.Syntax.PROTO2
2412
- || descriptor.hasOptionalKeyword()
2413
- || (!isOneofField && descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE);
+ hasHasMethod = descriptor.hasPresence();
2414
ReflectionInvoker reflectionInvoker =
2415
new ReflectionInvoker(
2416
descriptor,
0 commit comments