Fixed bug on rr clients

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@142213 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-02-03 17:32:11 +00:00
parent 2d63bb9418
commit 7e3ddf7c7b
1 changed files with 6 additions and 4 deletions

View File

@ -260,11 +260,13 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
String res = result.toString();
logger.trace("Server returned content : {}", res);
if (String.class.isAssignableFrom(clazz)) {
return (C) res;
if(Boolean.class.isAssignableFrom(clazz)){
return (C) ((Boolean) Boolean.getBoolean(res)) ;
}else if(ISManageable.class.isAssignableFrom(clazz)){
return (C) ISMapper.unmarshal((Class<ISManageable>) clazz, res);
}
return (C) ISMapper.unmarshal((Class<ISManageable>) clazz, res);
return (C) res;
}
}