We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4009b42 + a93d6dd commit 06544e9Copy full SHA for 06544e9
java/ql/lib/change-notes/2023-12-19-add-replace-methods-to-mapmutator.md
@@ -0,0 +1,4 @@
1
+---
2
+category: minorAnalysis
3
4
+* Added the `Map#replace` and `Map#replaceAll` methods to the `MapMutator` class in `semmle.code.java.Maps`.
java/ql/lib/semmle/code/java/Maps.qll
@@ -40,7 +40,9 @@ class MapMethod extends Method {
40
41
/** A method that mutates the map it belongs to. */
42
class MapMutator extends MapMethod {
43
- MapMutator() { pragma[only_bind_into](this).getName().regexpMatch("(put.*|remove|clear)") }
+ MapMutator() {
44
+ pragma[only_bind_into](this).getName().regexpMatch("(put.*|remove|clear|replace.*)")
45
+ }
46
}
47
48
/** The `size` method of `java.util.Map`. */
0 commit comments