String.indexOf()
calls
that can be replaced with a call to the String.contains()
method.
Example:
boolean b = "abcd".indexOf('e') >= 0;
After the quick-fix is applied:
boolean b = "abcd".contains('e');
This inspection only reports if the language level of the project or module is 5 or higher.