class MergeRequestRest {

    @PUT
    @Path("{requestId}/comments/{commentId}")
    @Consumes(MediaType.TEXT_PLAIN)
    @RolesAllowed("user")
    @ApiOperation("Updates a Comment by its ID using the provided String")
    public Response updateComment(@PathParam("commentId") String commentId, String newCommentStr) {
        Resource commentIdResource = createIRI(commentId, vf);
        Comment comment = manager.getComment(commentIdResource).orElseThrow(() ->
                ErrorUtils.sendError("Comment " + commentId + " could not be found",
                        Response.Status.BAD_REQUEST));
        checkStringParam(newCommentStr, "Comment string is required");
        comment.setProperty(vf.createLiteral(newCommentStr), vf.createIRI(_Thing.description_IRI));
        try {
            manager.updateComment(commentIdResource, comment);
            return Response.ok().build();
        } catch (IllegalArgumentException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.BAD_REQUEST);
        } catch (IllegalStateException | MobiException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.INTERNAL_SERVER_ERROR);
        }
    }

}