avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [1/2] avro git commit: AVRO-1907 ADDENDUM: Do not warn when logical type name is null.
Date Sat, 05 Nov 2016 22:05:11 GMT
Repository: avro
Updated Branches:
  refs/heads/branch-1.8 620b2807e -> edf6a7e6c


AVRO-1907 ADDENDUM: Do not warn when logical type name is null.


Project: http://git-wip-us.apache.org/repos/asf/avro/repo
Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/695efafb
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/695efafb
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/695efafb

Branch: refs/heads/branch-1.8
Commit: 695efafb45f96c9d9ae0f905ef3c33fe75751612
Parents: 620b280
Author: Ryan Blue <blue@apache.org>
Authored: Sat Nov 5 14:56:35 2016 -0700
Committer: Ryan Blue <blue@apache.org>
Committed: Sat Nov 5 15:04:14 2016 -0700

----------------------------------------------------------------------
 lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/695efafb/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java b/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java
index 742b2fc..2f75594 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java
@@ -61,7 +61,9 @@ public class LogicalTypes {
 
     LogicalType logicalType;
     try {
-      if (TIMESTAMP_MILLIS.equals(typeName)) {
+      if (typeName == null) {
+        logicalType = null;
+      } else if (TIMESTAMP_MILLIS.equals(typeName)) {
         logicalType = TIMESTAMP_MILLIS_TYPE;
       } else if (DECIMAL.equals(typeName)) {
         logicalType = new Decimal(schema);


Mime
View raw message