Skip to content

Commit 2dc4422

Browse files
author
Nas Denkov
committed
use hasPresence instead of proto3 checks
1 parent c28aff2 commit 2dc4422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protobuf-converter/src/main/java/io/confluent/connect/protobuf/ProtobufData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ private boolean isPrimitiveOrRepeated(FieldDescriptor fieldDescriptor) {
13091309
}
13101310

13111311
private boolean isOptional(FieldDescriptor fieldDescriptor) {
1312-
return fieldDescriptor.toProto().getProto3Optional()
1312+
return fieldDescriptor.hasPresence()
13131313
|| (supportOptionalForProto2 && hasOptionalKeyword(fieldDescriptor));
13141314
}
13151315

0 commit comments

Comments
 (0)