-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARJAVA-4695 fix FP in rule S6804 : stop raising issues when we inj…
…ect a Spring resource (#4603)
- Loading branch information
1 parent
7db58b1
commit e739ac5
Showing
5 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
its/autoscan/src/test/resources/autoscan/diffs/diff_S6804.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"ruleKey": "S6804", | ||
"hasTruePositives": false, | ||
"falseNegatives": 11, | ||
"falseNegatives": 12, | ||
"falsePositives": 0 | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...iling/checks/spring/ValueAnnotationShouldInjectPropertyOrSpELCheckSampleNonCompiling.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package checks; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
|
||
class ValueAnnotationShouldInjectPropertyOrSpELCheckSampleNonCompiling { | ||
@org.springframework.beans.factory.annotation.Value(null) // compliant | ||
String wrongannotationValue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters