Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Generated code using JERSEY 1.18.1 creating tons of calls with deprecated classes. #74

Open
glassfishrobot opened this issue Oct 1, 2014 · 2 comments

Comments

@glassfishrobot
Copy link
Contributor

Generated main class from wadl2java is generating tons of calls to a deprecated method.

publicT getAsXml(Class returnType) {
UriBuilder localUriBuilder = _uriBuilder.clone();
com.sun.jersey.api.client.WebResource resource = _client.resource(localUriBuilder.buildFromMap(_templateAndMatrixParameterValues));
com.sun.jersey.api.client.WebResource.Builder resourceBuilder = resource.getRequestBuilder();
resourceBuilder = resourceBuilder.accept("application/xml");
com.sun.jersey.api.client.ClientResponse response;
response = resourceBuilder.method("GET", com.sun.jersey.api.client.ClientResponse.class);
if (!com.sun.jersey.api.client.ClientResponse.class.isAssignableFrom(returnType)) {
if (response.getStatus()>= 400)

{ throw new CAMSWebServices.WebApplicationExceptionMessage(Response.status(response.getClientResponseStatus()).build()); }

}
if (!com.sun.jersey.api.client.ClientResponse.class.isAssignableFrom(returnType))

{ return response.getEntity(returnType); }

else

{ return returnType.cast(response); }

}

Specifically this code is returning an issue:
response.getClientResponseStatus()).build()

The Issue is "The method getClientResponseStatus() from the type ClientResponse is deprecated"

Environment

Windows

Affected Versions

[current]

@glassfishrobot
Copy link
Contributor Author

Reported by sirgeek

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA WADL-74

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants