Move return statement
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-access/gcube-geoserver-connector@149215 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cf80f74993
commit
3eec7460a2
|
@ -8,13 +8,14 @@ import org.springframework.web.client.RestTemplate;
|
|||
import net.sf.json.JSONObject;
|
||||
|
||||
public class GCubeRestClient {
|
||||
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public AccessibleCredentialsEntity getAccessibleCredentials(String url) {
|
||||
|
||||
logger.warn("REST call to URL: " + url);
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
|
||||
try {
|
||||
String response = restTemplate.getForObject(url, String.class);
|
||||
logger.warn("JSON response: \n" + response);
|
||||
|
@ -23,8 +24,8 @@ public class GCubeRestClient {
|
|||
return (AccessibleCredentialsEntity) JSONObject.toBean(jsonObject, AccessibleCredentialsEntity.class);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error in getAccessibleCredentials() method: " + e.getMessage());
|
||||
return new AccessibleCredentialsEntity();
|
||||
}
|
||||
return new AccessibleCredentialsEntity();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue