-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exempt @RequestAttribute
from RequestMappingAnnotation
check
#189
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,8 @@ public final class RequestMappingAnnotation extends BugChecker implements Method | |
isType(ANN_PACKAGE_PREFIX + "PathVariable"), | ||
isType(ANN_PACKAGE_PREFIX + "RequestBody"), | ||
isType(ANN_PACKAGE_PREFIX + "RequestHeader"), | ||
isType(ANN_PACKAGE_PREFIX + "RequestParam"))), | ||
isType(ANN_PACKAGE_PREFIX + "RequestParam"), | ||
isType(ANN_PACKAGE_PREFIX + "RequestAttribute"))), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ Moving this up to retain sorting :). |
||
isSameType("java.io.InputStream"), | ||
isSameType("java.time.ZoneId"), | ||
isSameType("java.util.Locale"), | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,6 +25,7 @@ void identification() { | |||||||||||||||||||||
"import org.springframework.web.bind.annotation.PathVariable;", | ||||||||||||||||||||||
"import org.springframework.web.bind.annotation.PostMapping;", | ||||||||||||||||||||||
"import org.springframework.web.bind.annotation.PutMapping;", | ||||||||||||||||||||||
"import org.springframework.web.bind.annotation.RequestAttribute;", | ||||||||||||||||||||||
"import org.springframework.web.bind.annotation.RequestBody;", | ||||||||||||||||||||||
"import org.springframework.web.bind.annotation.RequestHeader;", | ||||||||||||||||||||||
"import org.springframework.web.bind.annotation.RequestMapping;", | ||||||||||||||||||||||
|
@@ -56,6 +57,9 @@ void identification() { | |||||||||||||||||||||
" A properRequestParam(@RequestParam String param);", | ||||||||||||||||||||||
"", | ||||||||||||||||||||||
" @RequestMapping", | ||||||||||||||||||||||
" A properRequestAttribute(@RequestAttribute String param);", | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And then similarly here (also tweaked the parameter name):
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Also moving up to retain sorting 😄) |
||||||||||||||||||||||
"", | ||||||||||||||||||||||
" @RequestMapping", | ||||||||||||||||||||||
" A properInputStream(InputStream input);", | ||||||||||||||||||||||
"", | ||||||||||||||||||||||
" @RequestMapping", | ||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 Let's keep the list sorted :)