Skip to content

create more precise range for implicit web annotation names validation #1411

Closed
@martinlippert

Description

@martinlippert

The validation that marks unnecessary name attributes in certain web annotations (like @RequestParam or @PathVariable) underlines the whole annotation section of the code at the moment, creating the impression that the full annotation statement is not necessary, whereas the attribute about the name is the only piece of the annotation that could be removed.

Instead of marking the complete annotation statement, the validation should only mark the name attribute definition.

Example

public Owner findOwner(@PathVariable(name = "ownerId", required = false) Integer ownerId) {
                       |-----------------------------------------------|

whereas the marker should only be positioned below the name = "ownerId":

public Owner findOwner(@PathVariable(name = "ownerId", required = false) Integer ownerId) {
                                     |--------------|

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions