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
This commit is contained in:
Luca Frosini 2017-02-07 16:08:44 +00:00
parent 7e3ddf7c7b
commit ff0462ccac
2 changed files with 9 additions and 9 deletions

View File

@ -171,12 +171,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
}
class ResourceRegistryCall<C> implements Call<EndpointReference, C> {
class ResourceRegistryClientCall<C> implements Call<EndpointReference, C> {
protected final Class<C> clazz;
protected final HTTPInputs httpInputs;
public ResourceRegistryCall(Class<C> clazz, HTTPInputs httpInputs) {
public ResourceRegistryClientCall(Class<C> 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<ISManageable>) clazz, res);
}
@ -290,7 +290,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.GET, null);
ResourceRegistryCall<ERType> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<ERType> 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<String> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<String> 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<String> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<String> 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<String> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<String> call = new ResourceRegistryClientCall<>(
String.class, httpInputs);
String schema = delegate.make(call);
logger.info("Got schema for {} is {}", type, schema);

View File

@ -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{