Skip to content

Commit

Permalink
Automated rollback of commit 2a55706.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 569253919
  • Loading branch information
zhangskz authored and copybara-github committed Sep 28, 2023
1 parent 49f2388 commit 30b6251
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,11 @@ public void clear(final GeneratedMessageV3.Builder<?> builder) {
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,
Expand Down

1 comment on commit 30b6251

@zhangskz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #14245

Please sign in to comment.