cerulean

          FindBugs

          FindBugs,http://findbugs.sourceforge.net/
          發(fā)現(xiàn)代碼中潛在bug的工具,有eclipse的插件,安裝后右鍵單擊java project name,點擊Find Bugs,切換到FindBugs得perspective可以看到結(jié)果,速度還比較快,比之前用過的一個(雖然已經(jīng)記不得名字了)快一些~具體的效果還是要逐個分析。

          Bug categories:

          Correctness bug
          Probable bug - an apparent coding mistake resulting in code that was probably not what the developer intended. We strive for a low false positive rate.
          Bad Practice
          Violations of recommended and essential coding practice. Examples include hash code and equals problems, cloneable idiom, dropped exceptions, serializable problems, and misuse of finalize. We strive to make this analysis accurate, although some groups may not care about some of the bad practices.
          Dodgy
          Code that is confusing, anomalous, or written in a way that leads itself to errors. Examples include dead local stores, switch fall through, unconfirmed casts, and redundant null check of value known to be null. More false positives accepted. In previous versions of FindBugs, this category was known as Style.
          Multithreaded correctness
               Incorrect lazy initialization and update of static field
               Calls Thread.sleep() with a lock held: better to use wait(lock)
               Synchronization on interned String could deadlock: 最好不用字符串,以免重復
          Performance
               invokes inefficient new String() constructor
               concatenates strings using + in a loop: better to use append StringBuffer
               inner class usage


          posted on 2009-08-14 16:04 cerulean 閱讀(993) 評論(0)  編輯  收藏 所屬分類: Java

          導航

          <2009年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          統(tǒng)計

          常用鏈接

          留言簿(3)

          隨筆分類

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 兴和县| 五华县| 紫金县| 浙江省| 和顺县| 长汀县| 龙江县| 仲巴县| 西华县| 昭觉县| 杂多县| 邻水| 达孜县| 碌曲县| 南城县| 铁岭市| 尤溪县| 永康市| 邢台市| 略阳县| 筠连县| 西充县| 徐州市| 镇坪县| 祁门县| 额尔古纳市| 扬州市| 湟中县| 乌拉特前旗| 和田市| 桃江县| 天津市| 广州市| 怀来县| 洱源县| 灵丘县| 大英县| 法库县| 禹城市| 柳江县| 儋州市|