This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new e7e5cfe AVRO-2881: Fix Protobuf double default value (#927)
e7e5cfe is described below
commit e7e5cfe44f662c5a1af4c550e76b7756ee7f5e60
Author: Koosha <[email protected]>
AuthorDate: Wed Aug 19 19:56:17 2020 +0200
AVRO-2881: Fix Protobuf double default value (#927)
Default value of double should be 0.0 not 0
---
.../protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
b/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
index 38f2d04..ca4d78b 100644
---
a/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
+++
b/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
@@ -352,7 +352,9 @@ public class ProtobufData extends GenericData {
case BOOL:
return NODES.booleanNode(false);
case FLOAT:
+ return NODES.numberNode(0.0F);
case DOUBLE:
+ return NODES.numberNode(0.0D);
case INT32:
case UINT32:
case SINT32: