You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by fo...@apache.org on 2020/06/08 12:58:28 UTC
[avro] branch master updated: AVRO-2780: ProtobufData and
ThriftData Can Get Into Endless Loop (#908)
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 249db48 AVRO-2780: ProtobufData and ThriftData Can Get Into Endless Loop (#908)
249db48 is described below
commit 249db48c63a9ddf5bd736a8c020fa5ebb267c50d
Author: belugabehr <12...@users.noreply.github.com>
AuthorDate: Mon Jun 8 08:58:18 2020 -0400
AVRO-2780: ProtobufData and ThriftData Can Get Into Endless Loop (#908)
---
.../protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java | 2 +-
lang/java/thrift/src/main/java/org/apache/avro/thrift/ThriftData.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 c4c0d9c..38f2d04 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
@@ -138,7 +138,7 @@ public class ProtobufData extends GenericData {
try {
Class c = SpecificData.get().getClass(schema);
if (c == null)
- return newRecord(old, schema); // punt to generic
+ return super.newRecord(old, schema); // punt to generic
if (c.isInstance(old))
return old; // reuse instance
return c.getMethod("newBuilder").invoke(null);
diff --git a/lang/java/thrift/src/main/java/org/apache/avro/thrift/ThriftData.java b/lang/java/thrift/src/main/java/org/apache/avro/thrift/ThriftData.java
index eaf11c7..0e08318 100644
--- a/lang/java/thrift/src/main/java/org/apache/avro/thrift/ThriftData.java
+++ b/lang/java/thrift/src/main/java/org/apache/avro/thrift/ThriftData.java
@@ -159,7 +159,7 @@ public class ThriftData extends GenericData {
try {
Class c = ClassUtils.forName(SpecificData.getClassName(schema));
if (c == null)
- return newRecord(old, schema); // punt to generic
+ return super.newRecord(old, schema); // punt to generic
if (c.isInstance(old))
return old; // reuse instance
return c.newInstance(); // create new instance