Eclipse FindBugs跳过各种bug
我已经在eclipse中以最低的设置启用了findbugs。它只是找到了一些bug,而不是全部bugEclipse FindBugs跳过各种bug,eclipse,findbugs,Eclipse,Findbugs,我已经在eclipse中以最低的设置启用了findbugs。它只是找到了一些bug,而不是全部bug String b = "bob"; b.trim(); b.replace('b', 'p'); 在上面的代码中,我认为findbugs应该标记不使用返回值的问题(很多其他网站都显示findbugs正在检测这种情况),但它不标记这种情况 我还认为它会发现一个空bug或者可能超出范围 ArrayList<String> test=getList(); Stri
String b = "bob";
b.trim();
b.replace('b', 'p');
在上面的代码中,我认为findbugs应该标记不使用返回值的问题(很多其他网站都显示findbugs正在检测这种情况),但它不标记这种情况
我还认为它会发现一个空bug或者可能超出范围
ArrayList<String> test=getList();
String c=test.get(10);
private ArrayList<String> getList() {
return null;
}
ArrayList test=getList();
字符串c=test.get(10);
私有ArrayList getList(){
返回null;
}
为什么没有检测到这些?对于第二个问题,您必须使用
@CheckForNull
注释方法getList
,以便FB知道该方法可能返回null
是否激活了此规则?根据eclipse,我有RV:MethodReturnCheck和RV:BadUseOfReturn。这些是唯一的RV条目