Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
This repository was 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

Description

@glassfishrobot

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]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions