Use indexOf(String, int)
MSALReplaces indexOf(String) in binary operations if the compared value is an int and not less than 1. Using the two-argument indexOf(String, int) form with a start position avoids redundantly scanning the beginning of the string when you already know the match must occur after a certain index.
org. openrewrite. staticanalysis. IndexOfChecksShouldUseAStartPositionmod run . --recipe= org. openrewrite. staticanalysis. IndexOfChecksShouldUseAStartPositionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.