You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sj...@apache.org on 2021/09/02 16:51:05 UTC
[flink-statefun] branch master updated: [FLINK-24110] Filter null
ComponentJsonObjects
This is an automated email from the ASF dual-hosted git repository.
sjwiesman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git
The following commit(s) were added to refs/heads/master by this push:
new 123e4d2 [FLINK-24110] Filter null ComponentJsonObjects
123e4d2 is described below
commit 123e4d2f6126a04f4f55b270b7c4646170cf5862
Author: sjwiesman <sj...@gmail.com>
AuthorDate: Wed Sep 1 09:21:16 2021 -0500
[FLINK-24110] Filter null ComponentJsonObjects
This closes #266
---
.../org/apache/flink/statefun/flink/core/jsonmodule/RemoteModule.java | 1 +
.../statefun-flink-core/src/test/resources/remote-module/module.yaml | 1 +
2 files changed, 2 insertions(+)
diff --git a/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/jsonmodule/RemoteModule.java b/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/jsonmodule/RemoteModule.java
index db1b07e..5aea97a 100644
--- a/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/jsonmodule/RemoteModule.java
+++ b/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/jsonmodule/RemoteModule.java
@@ -48,6 +48,7 @@ public final class RemoteModule implements StatefulFunctionModule {
private static List<ComponentJsonObject> parseComponentNodes(
Iterable<? extends JsonNode> componentNodes) {
return StreamSupport.stream(componentNodes.spliterator(), false)
+ .filter(node -> !node.isNull())
.map(ComponentJsonObject::new)
.collect(Collectors.toList());
}
diff --git a/statefun-flink/statefun-flink-core/src/test/resources/remote-module/module.yaml b/statefun-flink/statefun-flink-core/src/test/resources/remote-module/module.yaml
index b1e7142..6ebb751 100644
--- a/statefun-flink/statefun-flink-core/src/test/resources/remote-module/module.yaml
+++ b/statefun-flink/statefun-flink-core/src/test/resources/remote-module/module.yaml
@@ -24,3 +24,4 @@ spec:
kind: com.foo.bar/test.component.3
spec:
nonsense: ignored
+---
\ No newline at end of file