FindBugs缺陷库

时间:2023-03-09 15:36:52
FindBugs缺陷库

1.possible null pointer dereference

  解释:某字段可能为空

  修复:对应字段使用前判空

2.normal confidence

  解释:私有成员变量没有初始化

  修复:初始化成员变量

3.Method call passes null for nonnull parameter

  解释:方法参数没有判断有效性

  修复:方法参数使用前判空

4.Integral value cast to double and then passed to Math.ceil

  解释:整形数据的值转换为Double后使用了Math.ceil方法

  修复:

5.comparison of string objects using or

  解释:使用“==”或者“!=”比较String类型对象

  修复:使用.equals()比较