findbugs 错误分析
来源:互联网 发布:mac终端查找文件路径 编辑:程序博客网 时间:2024/05/16 02:09
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错误修改指南
- ssh ( Secure Shell )学习
- 0008算法笔记——【分治法】循环赛事日程表
- 编写ShellCode
- Ubuntu系统Update-rc.d命令
- 基于 EHT Form 组件的实现
- findbugs 错误分析
- Invalid action class configuration that references an unknown class named [XX]
- ibatis中#与$的区别
- C语言之calloc函数
- 100个windows平台C++开发错误之三编程
- ant与maven
- ORACLE返回各类型中的第一条记录
- js基本验证
- python函数 cmp() type() str() repr()和 ''