diff --git a/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/infrastructure/InfrastructureDialoguer.java b/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/infrastructure/InfrastructureDialoguer.java index 67699bd..e9b33e4 100644 --- a/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/infrastructure/InfrastructureDialoguer.java +++ b/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/infrastructure/InfrastructureDialoguer.java @@ -4,6 +4,7 @@ import static org.gcube.resources.discovery.icclient.ICFactory.client; import static org.gcube.resources.discovery.icclient.ICFactory.clientFor; import static org.gcube.resources.discovery.icclient.ICFactory.queryFor; +import java.util.Collections; import java.util.List; import org.gcube.common.encryption.StringEncrypter; @@ -85,10 +86,9 @@ public class InfrastructureDialoguer { query.setResult("$resource/Profile/Name/text()"); DiscoveryClient client = client(); List resources = client.submit(query); - if (resources==null || resources.size()==0){ - throw new Exception("No resource named StatisticalManagerAlgorithmPrivate available in scope "+scope); - } - LOGGER.debug("Found {} algorithms",resources.size()); + if (resources==null) + resources = Collections.emptyList(); + LOGGER.debug("Found {} private algorithms",resources.size()); return resources;