updateAllowedMethods(response, target); } else { response.setStatus(new Status(Status.CLIENT_ERROR_BAD_REQUEST, "Missing request entity"));
updateAllowedMethods(response, target); } else { response.setStatus(new Status(Status.CLIENT_ERROR_BAD_REQUEST, "Missing request entity")); }
    protected void handlePut(Resource target, Request request, Response response) {        if (request.isEntityAvailable()) {            Result result = target.put(request.getEntity());            response.setStatus(result.getStatus());            response.setRedirectRef(result.getRedirectRef());            response.setEntity(result.getEntity());            // HTTP spec says that PUT may return the list of allowed methods            updateAllowedMethods(response, target);        } else {            response.setStatus(new Status(Status.CLIENT_ERROR_BAD_REQUEST,                    "Missing request entity"));        }    }