MethodNodeFactory.defineIgnored incorrectly checks that requestMapping isn't present on the method:
boolean hasRequestMappingAnnotation = requestMapping != null;
while RequestMappingFactory.createRequestMapping never returns null. It returns RequestMapping with empty methods argument if RequestMapping annotation is not present on the method.
The fix would be to add
if (methods.isEmpty()) {
return null;
}
in RequestMappingFactory.createRequestMapping before
return new RequestMapping(methods.toArray(new RequestMethod[0]), produces.toArray(new String[0]), value.toArray(new String[0]));
MethodNodeFactory.defineIgnored incorrectly checks that requestMapping isn't present on the method:
boolean hasRequestMappingAnnotation = requestMapping != null;while
RequestMappingFactory.createRequestMappingnever returnsnull. It returnsRequestMappingwith emptymethodsargument ifRequestMappingannotation is not present on the method.The fix would be to add
in
RequestMappingFactory.createRequestMappingbeforereturn new RequestMapping(methods.toArray(new RequestMethod[0]), produces.toArray(new String[0]), value.toArray(new String[0]));