You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/08/17 15:16:12 UTC

[incubator-streampipes] branch STREAMPIPES-577 updated: [STREAMPIPES-577] Fix wrong assignment of data type

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch STREAMPIPES-577
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/STREAMPIPES-577 by this push:
     new c55096f73 [STREAMPIPES-577] Fix wrong assignment of data type
c55096f73 is described below

commit c55096f7332a4c983aa95111a5ae700d630a60e7
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Aug 17 17:16:01 2022 +0200

    [STREAMPIPES-577] Fix wrong assignment of data type
---
 .../streampipes/connect/adapter/format/util/JsonEventProperty.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/format/util/JsonEventProperty.java b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/format/util/JsonEventProperty.java
index 672163863..b42711bc4 100644
--- a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/format/util/JsonEventProperty.java
+++ b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/format/util/JsonEventProperty.java
@@ -55,7 +55,11 @@ public class JsonEventProperty {
             resultProperty = new EventPropertyPrimitive();
             resultProperty.setRuntimeName(key);
             ((EventPropertyPrimitive) resultProperty).setRuntimeType(XSD._string.toString());
-        } else if (o.getClass().equals(Integer.class) || o.getClass().equals(Double.class)|| o.getClass().equals(Long.class)) {
+        } else if (o.getClass().equals(Long.class)) {
+            resultProperty = new EventPropertyPrimitive();
+            resultProperty.setRuntimeName(key);
+            ((EventPropertyPrimitive) resultProperty).setRuntimeType(XSD._long.toString());
+        } else if (o.getClass().equals(Integer.class) || o.getClass().equals(Double.class) || o.getClass().equals(Float.class)) {
             resultProperty = new EventPropertyPrimitive();
             resultProperty.setRuntimeName(key);
             ((EventPropertyPrimitive) resultProperty).setRuntimeType(XSD._float.toString());