Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CheckStyle Error - '@ResponseBody' annotation modifier does not preceed non-annotation modifiers

 
Tiya Khambadkone
Ranch Hand
Posts: 109
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the warning ''@ResponseBody' annotation modifier does not preceed non-annotation modifiers'
at the following line of code :

public @ResponseBody List<String> getModel(@RequestParam(value = "year", required = true) String year, @RequestParam(value = "make", required = true) String make, ModelAndView mv) {
//do something
}

Does anybody know how to fix it ?
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That checkstyle rule complains when the @ResponseBody is after the public to fix it make it look like this:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic