This is an automated email from the ASF dual-hosted git repository. bossenti pushed a commit to branch dev in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
commit 2847262368831e2a1bcfec1ab4f98e336e655fc1 Author: bossenti <[email protected]> AuthorDate: Wed May 12 09:38:53 2021 +0200 [STREAMPIPES-350] adapt to Double support --- .../processors/transformation/jvm/processor/state/StateUtils.java | 4 ++-- .../processor/state/labeler/buffer/StateBufferLabelerController.java | 2 +- .../jvm/processor/state/labeler/number/NumberLabelerController.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/StateUtils.java b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/StateUtils.java index 094f206..6019395 100644 --- a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/StateUtils.java +++ b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/StateUtils.java @@ -26,7 +26,7 @@ public class StateUtils { return extractor.collectionMembersAsGroup(LABEL_COLLECTION_ID); } - public static List<Integer> getNumberValues(ProcessingElementParameterExtractor extractor) { + public static List<Double> getNumberValues(ProcessingElementParameterExtractor extractor) { return getGroupItems(extractor) .stream() .map(group -> ( @@ -34,7 +34,7 @@ public class StateUtils { .extractGroupMember(NUMBER_VALUE_ID, group) .as(FreeTextStaticProperty.class)) .getValue()) - .map(Integer::parseInt) + .map(Double::parseDouble) .collect(Collectors.toList()); } diff --git a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/buffer/StateBufferLabelerController.java b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/buffer/StateBufferLabelerController.java index 19ef060..de538ec 100644 --- a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/buffer/StateBufferLabelerController.java +++ b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/buffer/StateBufferLabelerController.java @@ -97,7 +97,7 @@ public class StateBufferLabelerController extends StandaloneEventProcessingDecla String labelName = getLabelName(extractor); - List<Integer> numberValues = getNumberValues(extractor); + List<Double> numberValues = getNumberValues(extractor); List<String> labelStrings = getLabelStrings(extractor); diff --git a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/number/NumberLabelerController.java b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/number/NumberLabelerController.java index 8de4d2e..971b121 100644 --- a/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/number/NumberLabelerController.java +++ b/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/processor/state/labeler/number/NumberLabelerController.java @@ -75,7 +75,7 @@ public class NumberLabelerController extends StandaloneEventProcessingDeclarer<N String labelName = getLabelName(extractor); - List<Integer> numberValues = getNumberValues(extractor); + List<Double> numberValues = getNumberValues(extractor); List<String> labelStrings = getLabelStrings(extractor);
