From 3491fa0bc640c0af133591be7ec7a0dc9a00bb93 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Thu, 16 May 2019 12:51:09 +0000 Subject: [PATCH] bug fixing overriding of the scope git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@179453 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../datatransfer/resolver/services/CatalogueResolver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java b/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java index b6d666d..7bb4435 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java @@ -188,7 +188,8 @@ public class CatalogueResolver { if(scopeBean.is(Type.VO)) { logger.info("It is a {} scope", Type.VO); logger.warn("The Catalogue can't work at {} level, I'm overriding the scope to {} level", Type.VO, Type.INFRASTRUCTURE); - fullScope = fullScope.substring(1, fullScope.indexOf("/")); //skypping the first slash + String[] splitScope = fullScope.split("/"); + fullScope = splitScope[1]; //THIS IS THE INFRASTRUCTURE SCOPE logger.info("Overriden the input scope {} with {} as type: {}", fullScope, Type.INFRASTRUCTURE, fullScope); }