This commit is contained in:
Lucio Lelii 2018-01-08 15:37:31 +00:00
parent 768ea5f212
commit e921c05101
1 changed files with 4 additions and 4 deletions

View File

@ -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<String> client = client();
List<String> 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;