Skip to content

Commit

Permalink
Fix null pointer exception in case of missing Consumes annotation #19
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataygurturk committed Jun 30, 2016
1 parent da27f6d commit cbf1271
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static Object invoke(ResourceMethod resourceMethod,
);
}

if (consumesSpecificType(consumesAnnotation, MediaType.APPLICATION_JSON)
if (consumesAnnotation != null && consumesSpecificType(consumesAnnotation, MediaType.APPLICATION_JSON)
&& parameter.getType() == String.class) {
//Pass raw request body
varargs.add(request.getRequestBody());
Expand Down

0 comments on commit cbf1271

Please sign in to comment.