From 426ac12ef68fea5e6b6a5f406564a12d21e66e4b Mon Sep 17 00:00:00 2001 From: Jared Stehler Date: Fri, 10 May 2024 10:25:21 -0400 Subject: [PATCH] bump basepom to 59.9 --- pom.xml | 2 +- .../builtin/serializers/MessageSerializer.java | 6 ++---- .../protobuf/util/CompileCustomProtobufs.java | 12 ++++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 176e3e3..c327a75 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.hubspot basepom - 59.8 + 59.9 com.hubspot.jackson diff --git a/src/main/java/com/hubspot/jackson/datatype/protobuf/builtin/serializers/MessageSerializer.java b/src/main/java/com/hubspot/jackson/datatype/protobuf/builtin/serializers/MessageSerializer.java index da2f038..06533b3 100644 --- a/src/main/java/com/hubspot/jackson/datatype/protobuf/builtin/serializers/MessageSerializer.java +++ b/src/main/java/com/hubspot/jackson/datatype/protobuf/builtin/serializers/MessageSerializer.java @@ -110,11 +110,9 @@ public void serialize( } } else if ( message.hasField(field) || - ( - writeDefaultValues && + (writeDefaultValues && !supportsFieldPresence(field) && - field.getContainingOneof() == null - ) + field.getContainingOneof() == null) ) { generator.writeFieldName(fieldName); writeValue(field, message.getField(field), generator, serializerProvider); diff --git a/src/test/java/com/hubspot/jackson/datatype/protobuf/util/CompileCustomProtobufs.java b/src/test/java/com/hubspot/jackson/datatype/protobuf/util/CompileCustomProtobufs.java index 4f19286..ad9b5be 100644 --- a/src/test/java/com/hubspot/jackson/datatype/protobuf/util/CompileCustomProtobufs.java +++ b/src/test/java/com/hubspot/jackson/datatype/protobuf/util/CompileCustomProtobufs.java @@ -179,11 +179,11 @@ public int getSerializedSize() { size = 0; if (fieldWithNoJsonName_ != 0) { size += - com.google.protobuf.CodedOutputStream.computeInt32Size(1, fieldWithNoJsonName_); + com.google.protobuf.CodedOutputStream.computeInt32Size(1, fieldWithNoJsonName_); } if (fieldWithJsonName_ != 0) { size += - com.google.protobuf.CodedOutputStream.computeInt32Size(2, fieldWithJsonName_); + com.google.protobuf.CodedOutputStream.computeInt32Size(2, fieldWithJsonName_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -196,9 +196,8 @@ public boolean equals(final java.lang.Object obj) { return true; } if ( - !( - obj instanceof com.hubspot.jackson.datatype.protobuf.util.CompileCustomProtobufs.MixedJsonName - ) + !(obj instanceof + com.hubspot.jackson.datatype.protobuf.util.CompileCustomProtobufs.MixedJsonName) ) { return super.equals(obj); } @@ -468,7 +467,8 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if ( - other instanceof com.hubspot.jackson.datatype.protobuf.util.CompileCustomProtobufs.MixedJsonName + other instanceof + com.hubspot.jackson.datatype.protobuf.util.CompileCustomProtobufs.MixedJsonName ) { return mergeFrom( (com.hubspot.jackson.datatype.protobuf.util.CompileCustomProtobufs.MixedJsonName) other