不积跬步,无以至千里

个人博客地址:https://lewky.cn

PMD - Avoid autogenerated methods to access private fields and methods of inner / outer classes

PMD错误 Avoid autogenerated methods to access private fields and methods of inner / outer classes 样例 public class Test { public static void m...

2018-08-23 23:32:55

阅读数 117

评论数 0

Eclipse笔记-PMD插件

PMD是一种静态解析Java代码错误的工具,可以在不运行Java程序的情况下对Java代码进行分析并报告错误。Eclipse的PMD插件自带了许多规则(并不是所有规则都是合理的,有的规则报告的错误可以无视),也可以自己制定规则并导入。 Eclipse在线安装插件 1、Help -&...

2018-03-28 23:22:06

阅读数 3268

评论数 0

PMD笔记-Avoid if (x != y) ..; else ..;

PMD错误 Avoid if (x != y) ..; else ..; 样例public class Test { public int a = 1; public static void main(final String[] args) { final Tes...

2018-03-13 14:34:25

阅读数 193

评论数 0

PMD笔记-Overridable method 'XXX' called during object construction

PMD错误 Overridable method ‘XXX’ called during object construction 样例public class Test { public int a; public Test() { test(); } ...

2018-03-13 14:23:59

阅读数 222

评论数 0

PMD笔记-Avoid reassigning parameters such as 'XXX'

在用PMD检测代码时发现报错如下: Avoid reassigning parameters such as ‘col’. Reassigning values to incoming parameters is not recommended. Use temporary local ...

2018-03-08 16:42:57

阅读数 956

评论数 0

提示
确定要删除当前文章?
取消 删除