欢迎来到天天文库
浏览记录
ID:47428846
大小:131.50 KB
页数:24页
时间:2020-01-11
《Findbugs缺陷等级对照表》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、FindBugsBugDescriptionsThisdocumentliststhestandardbugpatternsreportedbyversion0.8.5.Summary序号等级DescriptionCategory14AEC:Calltoequals()withnullargument调用Equal方法的参数为空Correctness15AEC:Calltoequals()comparingdifferentinterfacetypes调用Equal方法去比较不同的接口类型Correctn
2、ess16AEC:Calltoequals()comparingdifferenttypes调用Equal方法去比较不同的数据类型Correctness17AES:ComparisonofStringobjectsusing==or!=使用==或者!=去比较字符串或对象Correctness29BIJU:TestCaseimplementssetUpbutdoesn'tcallsuper.setUp()测试实例实现了setUp()但没有调用super.setUp()Correctness36ANP:Nul
3、lpointerdereferenceinmethod方法中存在空指针Correctness37ANP:Nullpointerdereferenceinmethodonexceptionpath方法中存在某异常路径中的空指针Correctness38ANP:Possiblenullpointerdereferenceinmethod方法中存在可能在运行时出现的空指针异常Correctness39ANP:Possiblenullpointerdereferenceinmethodonexceptionpat
4、h方法中存在可能在某些异常路径下出现的空指针异常Correctness41CNm:Classdefinesequal();shoulditbeequals()?类中定义了equal方法,但是没有重写java.lang.Object中equal方法,这也有可能是有意这么做的Correctness42BNm:ConfusingmethodnamesCorrectness一些方法名只有大小写的区别,容易混绕43BNm:Confusingmethodname方法名和其超类的类名相同Correctness44CNm
5、:Classdefineshashcode();shoulditbehashCode()?类中定义了hashCode()方法,但是没有重写java.lang.Object中的hashCode()方法,这也有可能是有意这么做的Correctness45CNm:Classdefinestostring();shoulditbetoString()?类中定义了tostring()方法,但是没有重写java.lang.Object中的tostring()方法,这也有可能是有意这么做的Correctness46AN
6、m:Veryconfusingmethodnames一些方法名只有大小写的区别,特别容易混绕Correctness47AODR:Methodmayfailtoclosedatabaseresource方法可能没有关闭数据源Correctness48AODR:Methodmayfailtoclosedatabaseresourceonexception方法在异常时可能无法关闭数据源Correctness49AOS:Methodmayfailtoclosestream方法可能没有关闭流Correctness5
7、0AOS:Methodmayfailtoclosestreamonexception方法在异常时可能无法关闭流Correctness53CRCN:Redundantcomparisiontonullofpreviouslycheckedvalue预测值的几个比较的值中有null值Correctness54CRCN:Redundantcomparisontonull几个比较的值中有null值Correctness57CRV:Methodignoresreturnvalue方法忽略了返回值Correctnes
8、s59ASI:Staticinitializerforclasscreatesinstancebeforeallstaticfinalfieldsassigned类的静态初始化器实例化一个该类对象要在所有的常量属性定义之前Correctness72CUwF:Unwrittenfield永远不会写到的字段,所有读取将返回默认值Correctness83AMS:Fieldisn'tfinalbutshouldbe字段应该为常量的却
此文档下载收益归作者所有