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/18 20:33:18 UTC

[incubator-streampipes] 12/15: [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 rel/0.70.0
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit bb121bbcb7f2e3347f48a248a7893271263c3da4
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());