findbugs 错误分析
来源:互联网 发布:手机基站测试软件 编辑:程序博客网 时间:2024/05/22 16:17
findbugs 出错类型及对应解释
1、Dead store to local variable 本地变量存储了闲置不用的对象
举例:
List accountCoList = new ArrayList();
我们为accountCoList新建了一个对象,但是程序的后面并没有使用这个这个新建对象。
建议改为:
List accountCoList = null;
2、Write to static field from instance method 向static字段中写入值
举例:
建议改为:
去掉static。
3、Load of known null value 大体意思是加载了null的对象。
举例
4、Exception is caught when Exception is not thrown 这个意思比较好理解:就是catch了异常但是try里并没有抛出异常
5、Method ignores exceptional return value 没有对方法的异常返回值进行检查
6、Comparison of String objects using == or !=
This code compares java.lang.String objects for reference equality using the == or != operators.
Unless both strings are either constants in a source file, or have been interned using the String.intern() method,
7、Method names should start with a lower case letter 这个好理解方法名的第一个字母不能是大写
8、Non-transient non-serializable instance field in serializable class
This Serializable class defines a non-primitive instance field which is neither transient, Serializable,
这个错误的意思是:在可序列化的类中存在不能序列化或者不能暂存的数据
- FINDBUGS错误分析日志
- findbugs 错误分析
- findbugs 错误分析
- findbugs 错误分析
- findbugs 错误分析
- findbugs 错误分析
- findbugs 错误分析
- (转)findbugs错误分析
- findbugs 错误分析(1)
- 【转】FINDBUGS错误分析日志
- 代码分析工具FindBugs 安装和错误说明
- FindBugs错误问题详解
- FindBugs错误修改指南
- FindBugs常见错误解决
- FindBugs错误修改指南
- findbugs错误总结
- findbugs 错误类型
- FindBugs错误修改指南
- 关于vs2008无法打开afxcontrolbars.h的错误
- linux下安装python3.3.3,configure后再make,一直重复configure运行的结果信息
- 各种错误
- Unity3D 移动开发代码优化
- 人生感悟
- findbugs 错误分析
- 针对一些异常处理方法
- hadoop
- 一段神奇的js代码
- C# yield return 的作用
- 用nohup执行python程序时,print无法输出
- 文本相似度——编辑距离算法&java简单实现
- unity3d 从0开始学
- Android编译之MAKE