You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2017/05/12 01:37:07 UTC

nifi git commit: NIFI-3861: AvroTypeUtil used different constant.

Repository: nifi
Updated Branches:
  refs/heads/master 6e4db6b11 -> 0b0ac196e


NIFI-3861: AvroTypeUtil used different constant.

Previous fix #1779 refactored the way to check Logical type to use string constants.
One of those refactoring used wrong constant mistakenly in normalizeValue method.

Fortunately, this defect is harmless since even though normalizeValue did not convert int to Time, DataTypeUtils.convertType does the same conversion.

Signed-off-by: Matt Burgess <ma...@apache.org>

This closes #1782


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/0b0ac196
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/0b0ac196
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/0b0ac196

Branch: refs/heads/master
Commit: 0b0ac196ea4574aa491ce56a1efa8d677536ae2a
Parents: 6e4db6b
Author: Koji Kawamura <ij...@apache.org>
Authored: Thu May 11 09:02:13 2017 +0900
Committer: Matt Burgess <ma...@apache.org>
Committed: Thu May 11 21:31:07 2017 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/avro/AvroTypeUtil.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/0b0ac196/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
index 52d749f..bd5e8e4 100644
--- a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
+++ b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java
@@ -481,7 +481,7 @@ public class AvroTypeUtil {
                 if (LOGICAL_TYPE_DATE.equals(logicalName)) {
                     // date logical name means that the value is number of days since Jan 1, 1970
                     return new java.sql.Date(TimeUnit.DAYS.toMillis((int) value));
-                } else if (LOGICAL_TYPE_TIMESTAMP_MILLIS.equals(logicalName)) {
+                } else if (LOGICAL_TYPE_TIME_MILLIS.equals(logicalName)) {
                     // time-millis logical name means that the value is number of milliseconds since midnight.
                     return new java.sql.Time((int) value);
                 }