Files
Bart van Helvertandintellij-monorepo-bot cfbf199e71 [java] Add ReplaceAllNonRegex inspection
Adds an inspection with a quickfix that suggests replacing `String#replaceAll` that doesn't pass regular expressions with `String#replace`. #IDEA-288385 Fixed


(cherry picked from commit e4bf212ae5693754c5a3dd51d9f5c578a5490e39)

IJ-MR-186138

GitOrigin-RevId: 8e2ad43e460b08f02529093e3f0d61a31e7d4efd
2025-12-24 10:54:58 +00:00

7 lines
327 B
Java

public class Comment {
void m(String s) {
// before line
/* before */ s = /* qualifier */ s. /* call */ <warning descr="Call to 'replaceAll()' with a non-regex pattern can be replaced with 'replace()'"><caret>replaceAll</warning>(/* arg 1 */"a", /* arg 2 */ "b" /* arg 3 */) /* expr */; // end
// after line
}
}