java - org.glassfish.jersey.client.ClientResponse cannot be applied to given types -
i have code:
version version = commonclient.authorizedrequestbuilder(commonclient.webtarget .path("/apps/blabla/default/" + appname + "/" + appname) .queryparam("object_type", "app")) .accept(mediatype.application_json_type) .get(clientresponse.class) .getentity(new generictype<version>() {});
how can fix solve error?
error:(38, 17) java: method getentity in class org.glassfish.jersey.client.clientresponse cannot applied given types; required: no arguments found: <anonymous javax.ws.rs.core.generictype<linqmap.supportool.services.gas.dto.version>> reason: actual , formal argument lists differ in length
the getentity() method accepts no parameters can't pass (new generictype() {})
use following instead
version version = commonclient.authorizedrequestbuilder(commonclient.webtarget .path("/apps/blabla/default/" + appname + "/" + appname) .queryparam("object_type", "app")) .accept(mediatype.application_json_type) .get(clientresponse.class) .getentity();
Comments
Post a Comment