Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Suspicious comparison of Integer references

850392Mar 25 2011 — edited Mar 28 2011
I ma using Find bugs tool, getting follwoing error Suspicious comparison of Integer references, can you please inform me how to resolve this?

public boolean equals(Object o) {

if (o == null) {
return false;
}
return (this.orderNbr == (((ProductCategoryType) o).orderNbr));
}
This post has been answered by tschodt on Mar 25 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2011
Added on Mar 25 2011
32 comments
6,585 views