示例:
Field stringHashField() throws NoSuchFieldException {
return String.class.getField("hash");
}
在应用快速修复后:
Field stringHashField() throws NoSuchFieldException {
return String.class.getDeclaredField("hash");
}
对于 final
类,很清楚该类中是否存在具有指定名称的字段或方法。
对于非 final
类,子类中可能有使用该名称的字段或方法,因此可能会出现误报。
进行该项检查的设置,来消除任何位置或特定类的此类误报。
2017.2 的新功能