...
Detection of invocations of Collection.remove()
whose operand fails to match the type of the elements of the underlying collection is straightforward. It is possible, although unlikely, that some of these invocations could be intended. The remainder are heuristically likely to be in error. Automated detection for other APIs could be possible.
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
SonarQube Java Plugin |
| S2175 | Implemented |
Bibliography
Chapter 5, "Inheritance" | |
[JCF 2014] | The Java Collections Framework |
[JLS 2015] | |
[Seacord 2015] | IDS17-J. Prevent XML External Entity Attacks LiveLesson |
"The Joy of Sets" |
...