muyangye commented on code in PR #2070:
URL: https://github.com/apache/streampipes/pull/2070#discussion_r1370964488


##########
streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/AdapterResource.java:
##########
@@ -156,8 +162,27 @@ public Response deleteAdapter(@PathParam("id") String 
elementId) {
         LOG.error("Error while deleting adapter with id " + elementId, e);
         return ok(Notifications.error(e.getMessage()));
       }
+    } else if (!deleteAssociatedPipelines) {
+      List<String> namesOfPipelinesUsingAdapter = new ArrayList<String>();
+      for (String pipelineId : pipelinesUsingAdapter) {
+        namesOfPipelinesUsingAdapter.add(
+            
StorageDispatcher.INSTANCE.getNoSqlStore().getPipelineStorageAPI().getPipeline(pipelineId).getName());
+      }
+      return Response.status(409).entity(String.join(", ", 
namesOfPipelinesUsingAdapter)).build();

Review Comment:
   Just fixed the magic number. Thanks for pointing out!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to