Angelo Lee's Blog
This is my kingdom .If i don't fight for it ,who will ?

1.Introduction

Official Website:

PMD scans Java source code and looks for potential problems like:

  • Possible bugs - empty try/catch/finally/switch statements
  • Dead code - unused local variables, parameters and private methods
  • Suboptimal code - wasteful String/StringBuffer usage
  • Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
  • Duplicate code - copied/pasted code means copied/pasted bugs

PMD扫描java代码并寻找潜在的如下问题:

     1.可能的bug - 空try/catch/finally/switch语句

     2.无效代码 -未使用的变量,参数和私有方法

     3.非最佳的代码 - 较耗费资源的String/StringBuffer用法

     4.过于复杂的表达式 - 不必要的if语句,或应该为while的for循环

     5.重复代码 - 复制/粘贴代码意味着复制/粘贴bug

 

Usage:

posted on 2013-02-25 18:41  Angelo Lee  阅读(186)  评论(0编辑  收藏  举报