From ff0462ccac160761171bd4588e5998d8c43cb1be Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 7 Feb 2017 16:08:44 +0000 Subject: [PATCH] Fixed boolean return transformation git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@142348 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/proxy/ResourceRegistryClientImpl.java | 14 +++++++------- .../resourceregistry/client/proxy/ScopedTest.java | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java index 2170e88..90a1ca9 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java @@ -171,12 +171,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } - class ResourceRegistryCall implements Call { + class ResourceRegistryClientCall implements Call { protected final Class clazz; protected final HTTPInputs httpInputs; - public ResourceRegistryCall(Class clazz, HTTPInputs httpInputs) { + public ResourceRegistryClientCall(Class clazz, HTTPInputs httpInputs) { this.clazz = clazz; this.httpInputs = httpInputs; } @@ -261,7 +261,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { logger.trace("Server returned content : {}", res); if(Boolean.class.isAssignableFrom(clazz)){ - return (C) ((Boolean) Boolean.getBoolean(res)) ; + return (C) ((Boolean) Boolean.valueOf(res)) ; }else if(ISManageable.class.isAssignableFrom(clazz)){ return (C) ISMapper.unmarshal((Class) clazz, res); } @@ -290,7 +290,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPMETHOD.GET, null); - ResourceRegistryCall call = new ResourceRegistryCall<>( + ResourceRegistryClientCall call = new ResourceRegistryClientCall<>( clazz, httpInputs); ERType erType = delegate.make(call); @@ -324,7 +324,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPMETHOD.GET, parameters); - ResourceRegistryCall call = new ResourceRegistryCall<>( + ResourceRegistryClientCall call = new ResourceRegistryClientCall<>( String.class, httpInputs); String ret = delegate.make(call); @@ -365,7 +365,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPMETHOD.GET, parameters); - ResourceRegistryCall call = new ResourceRegistryCall<>( + ResourceRegistryClientCall call = new ResourceRegistryClientCall<>( String.class, httpInputs); String ret = delegate.make(call); @@ -403,7 +403,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPMETHOD.GET, parameters); - ResourceRegistryCall call = new ResourceRegistryCall<>( + ResourceRegistryClientCall call = new ResourceRegistryClientCall<>( String.class, httpInputs); String schema = delegate.make(call); logger.info("Got schema for {} is {}", type, schema); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/client/proxy/ScopedTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/client/proxy/ScopedTest.java index 26e1e0c..3e7be29 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/client/proxy/ScopedTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/client/proxy/ScopedTest.java @@ -59,8 +59,8 @@ public class ScopedTest { GCUBE_DEVSEC = properties.getProperty(GCUBE_DEVSEC_VARNAME); GCUBE_DEVSEC_DEVVRE = properties.getProperty(GCUBE_DEVSEC_DEVVRE_VARNAME); - DEFAULT_TEST_SCOPE = GCUBE_DEVSEC; - ALTERNATIVE_TEST_SCOPE = GCUBE_DEVSEC_DEVVRE; + DEFAULT_TEST_SCOPE = GCUBE_DEVNEXT; + ALTERNATIVE_TEST_SCOPE = GCUBE_DEVNEXT_NEXTNEXT; } public static String getCurrentScope(String token) throws ObjectNotFound, Exception{