Skip to content

Bug in RequestMappingFactory.createRequestMapping or MethodNodeFactory.defineIgnored 🐛 #83

Description

@izogfif

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]));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions