您的位置:首页 > 其它

欢迎使用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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  some-bugs