Skip to content

Commit dcb929f

Browse files
committed
pb: Fix equals condition for bytes
1 parent 0416a9c commit dcb929f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protoc-gen/protobuf/src/main/kotlin/kotlinx/rpc/protoc/gen/ModelToProtobufKotlinCommonGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ class ModelToProtobufKotlinCommonGenerator(
318318
is FieldType.IntegralType -> {
319319
if (t == FieldType.IntegralType.BYTES) {
320320
if (field.nullable) {
321-
addLine("if ($presenceCheck((${field.name} != null && (other.${field.name} == null || !${field.name}!!.contentEquals(other.${field.name}!!))) || other.${field.name} != null)) return false")
321+
addLine("if ($presenceCheck((${field.name} != null && (other.${field.name} == null || !${field.name}!!.contentEquals(other.${field.name}!!))) || ${field.name} == null)) return false")
322322
} else {
323323
addLine("if ($presenceCheck!${field.name}.contentEquals(other.${field.name})) return false")
324324
}

0 commit comments

Comments
 (0)