You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2023/04/12 16:43:51 UTC

[streampipes] branch dev updated: [SP-1504] Do not remove streams on pipeline export (#1505)

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 2308d9a9c [SP-1504] Do not remove streams on pipeline export (#1505)
2308d9a9c is described below

commit 2308d9a9ce54cf3d224559dfe2e3e12211b40714
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Wed Apr 12 18:43:43 2023 +0200

    [SP-1504] Do not remove streams on pipeline export (#1505)
    
    * [SP-1504] Do not remove streams on pipeline export
    
    * [SP-1504] Reset endpoint url for data sets
---
 .../org/apache/streampipes/export/resolver/PipelineResolver.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/streampipes-data-export/src/main/java/org/apache/streampipes/export/resolver/PipelineResolver.java b/streampipes-data-export/src/main/java/org/apache/streampipes/export/resolver/PipelineResolver.java
index 9ba922136..1a96336b3 100644
--- a/streampipes-data-export/src/main/java/org/apache/streampipes/export/resolver/PipelineResolver.java
+++ b/streampipes-data-export/src/main/java/org/apache/streampipes/export/resolver/PipelineResolver.java
@@ -43,7 +43,11 @@ public class PipelineResolver extends AbstractResolver<Pipeline> {
     doc.setActions(doc.getActions().stream().peek(s -> s.setSelectedEndpointUrl(null)).collect(Collectors.toList()));
     doc.setStreams(doc.getStreams()
         .stream()
-        .filter(s -> s instanceof SpDataSet).peek(s -> ((SpDataSet) s).setSelectedEndpointUrl(null))
+        .peek(s -> {
+          if (s instanceof SpDataSet) {
+            ((SpDataSet) s).setSelectedEndpointUrl(null);
+          }
+        })
         .collect(Collectors.toList()));
     return doc;
   }