欢迎使用CSDN-markdown编辑器
2015-12-09 13:56
239 查看
About Findbugs:
CALL TO EQUALS() COMPARING DIFFERENT TYPES.
1) This method calls equals(Object) on two references of different class types and analysis suggests they will be to objects of different classes at runtime. Further, examination of the equals methods that would be invoked suggest that either this call will always return false, or else the equals method is not be symmetric (which is a property required by the contract for equals in class Object).
Bug: Suspicious comparison of Integer references in com.oasys.serviceImpl.BadgeTaskServiceImpl.addBadgeTaskMgr(WorkFlowTasksModel)
This method compares two reference values using the == or != operator, where the correct way to compare instances of this type is generally with the equals() method. It is possible to create distinct instances that are equal but do not compare as == since they are different objects. Examples of classes which should generally not be compared by reference are java.lang.Integer, java.lang.Float, etc.
3.Bug: Integral value cast to double and then passed to Math.ceil in com.oasys.util.ExcelUtil.exportExcel(List, String, int, OutputStream)
This code converts an integral value (e.g., int or long) to a double precision floating point number and then passing the result to the Math.ceil() function, which rounds a double to the next higher integer value. This operation should always be a no-op, since the converting an integer to a double should give a number with no fractional part. It is likely that the operation that generated the value to be passed to Math.ceil was intended to be performed using double precision floating point arithmetic.
4.Bug: Possible null pointer dereference of null in com.oasys.listener.pd.EmpSalPositionChgApp.EmpSalPositionChgAppTaskListener.setDirectSuperiorTaskGroup(DelegateTask, Integer)
There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can’t ever be executed; deciding that is beyond the ability of FindBugs.
5.Bug: Class com.oasys.model.BusinessTripApp defines non-transient non-serializable instance field taskModel
This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.
CALL TO EQUALS() COMPARING DIFFERENT TYPES.
1) This method calls equals(Object) on two references of different class types and analysis suggests they will be to objects of different classes at runtime. Further, examination of the equals methods that would be invoked suggest that either this call will always return false, or else the equals method is not be symmetric (which is a property required by the contract for equals in class Object).
Bug: Suspicious comparison of Integer references in com.oasys.serviceImpl.BadgeTaskServiceImpl.addBadgeTaskMgr(WorkFlowTasksModel)
This method compares two reference values using the == or != operator, where the correct way to compare instances of this type is generally with the equals() method. It is possible to create distinct instances that are equal but do not compare as == since they are different objects. Examples of classes which should generally not be compared by reference are java.lang.Integer, java.lang.Float, etc.
3.Bug: Integral value cast to double and then passed to Math.ceil in com.oasys.util.ExcelUtil.exportExcel(List, String, int, OutputStream)
This code converts an integral value (e.g., int or long) to a double precision floating point number and then passing the result to the Math.ceil() function, which rounds a double to the next higher integer value. This operation should always be a no-op, since the converting an integer to a double should give a number with no fractional part. It is likely that the operation that generated the value to be passed to Math.ceil was intended to be performed using double precision floating point arithmetic.
4.Bug: Possible null pointer dereference of null in com.oasys.listener.pd.EmpSalPositionChgApp.EmpSalPositionChgAppTaskListener.setDirectSuperiorTaskGroup(DelegateTask, Integer)
There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can’t ever be executed; deciding that is beyond the ability of FindBugs.
5.Bug: Class com.oasys.model.BusinessTripApp defines non-transient non-serializable instance field taskModel
This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods. Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.
相关文章推荐
- 补码
- ubuntu 14.04上源码编译安装php7
- Java代码中的字符编码转换
- 异步图片下载问题随笔
- 基于比特币的新型电子支付货币
- 完成点击×出现对话框功能
- Java学习笔记----面对对象
- 快速上手的XMind导图软件
- LightOJ 1068 - Investigation(数位DP)
- 二维矩阵的一维访问方式
- 小软件神器集合(不定期更新)
- Android——图片压缩
- 中软国际Java程序员笔试题
- java 设置特定时间
- android 开发中需要注意内存泄露的地方
- STM32 FSMC总线与TFT8080接口对接分析
- js无限级树菜单
- Maven简介(六)——Dependency
- 覆盖的理解
- Android-Androidstudio集成git开发环境