Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-1555

S107 : Ignore methods annotated with Spring '@RequestMapping'

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.12
    • Component/s: Rules
    • Labels:
      None

      Description

      Methods annotated with Spring's @RequestMapping may have a lot of parameters, encapsulation being possible. Such methods have to be ignored therefore ignored.

      @RequestMapping(value="/doStuff", method = RequestMethod.GET)
      public void doStuff(@AllowedOwner final String param0, 
        @Required final String param1,
        @Required final String param2,
        @Required final String param3,
        @Required final String param4,
        @Required final String param5,
        @Required final String param6,
        @Required final String param7,
        @Required final String param8) {
       // ...
      }
      

      Note: Rule description have been updated to add exception.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael.gumowski Michael Gumowski
                Reporter:
                michael.gumowski Michael Gumowski
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: