Skip to content

Commit ce130c6

Browse files
committed
Add replace to MapMutator
1 parent 4009b42 commit ce130c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/ql/lib/semmle/code/java/Maps.qll

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ class MapMethod extends Method {
4040

4141
/** A method that mutates the map it belongs to. */
4242
class MapMutator extends MapMethod {
43-
MapMutator() { pragma[only_bind_into](this).getName().regexpMatch("(put.*|remove|clear)") }
43+
MapMutator() {
44+
pragma[only_bind_into](this).getName().regexpMatch("(put.*|remove|clear|replace.*)")
45+
}
4446
}
4547

4648
/** The `size` method of `java.util.Map`. */

0 commit comments

Comments
 (0)