You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/11/11 11:01:52 UTC

[incubator-streampipes] branch dev updated: [STREAMPIPES-254] fix ClassCastException from long to double

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 72fbcf0  [STREAMPIPES-254] fix ClassCastException from long to double
72fbcf0 is described below

commit 72fbcf0633b4cac754f31f18dcab39501269fa86
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Wed Nov 11 10:14:56 2020 +0100

    [STREAMPIPES-254] fix ClassCastException from long to double
---
 .../transform/value/CorrectionValueTransformationRule.java              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/transform/value/CorrectionValueTransformationRule.java b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/transform/value/CorrectionValueTransformationRule.java
index 4905235..a98accb 100644
--- a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/transform/value/CorrectionValueTransformationRule.java
+++ b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/transform/value/CorrectionValueTransformationRule.java
@@ -48,7 +48,7 @@ public class CorrectionValueTransformationRule implements ValueTransformationRul
 
         if (eventKey.size() == 1) {
             try {
-                double oldValue = (Double) event.get(eventKey.get(0));
+                double oldValue = Double.valueOf(String.valueOf(event.get(eventKey.get(0))));
                 double newValue;
 
                 switch (operator) {