Example:
Field stringHashField() throws NoSuchFieldException {
return String.class.getField("hash");
}
After the quick-fix is applied the result looks like:
Field stringHashField() throws NoSuchFieldException {
return String.class.getDeclaredField("hash");
}
With a final class it's clear if there's a field or method with the specified name in the class.
With non-final classes it's possible that a subclass has a field or method with that name, so there could be false positives.
You may use the inspection settings to get rid of such false positives, everywhere or with specific classes.
New in 2017.2