Fix a test regression observed after branch update

This commit is contained in:
Jason Lunn 2021-10-04 15:43:21 +00:00
parent a09c8e1c79
commit b5687819a6

View File

@ -351,9 +351,11 @@ public class RubyMessage extends RubyObject {
fieldDescriptor = descriptor.findFieldByName(methodName);
if (fieldDescriptor != null &&
(!proto3 || fieldDescriptor.getContainingOneof() == null) && // This seems like a bug but its needed to pass the tests...
(!proto3 || fieldDescriptor.getContainingOneof() == null || fieldDescriptor
.getContainingOneof().isSynthetic()) &&
fieldDescriptor.hasPresence()) {
return fields.containsKey(fieldDescriptor) ? runtime.getTrue() : runtime.getFalse();
return fields.containsKey(fieldDescriptor) ? runtime.getTrue()
: runtime.getFalse();
}
} else if (methodName.endsWith(AS_VALUE_SUFFIX)) {