poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47969] Problematic equals methods
Date Tue, 13 Oct 2009 23:39:07 GMT

Josh Micich <josh@gildedtree.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Josh Micich <josh@gildedtree.com> 2009-10-13 16:39:04 UTC ---
I guess these 'problems' were also found by an automated code checker. 
Actually, all four equals() methods were optimised for performance, knowing
that the instanceof check is not needed.  Note that none of the classes is
public.  I am pretty sure it is impossible to get a CCE or NPE from any of
these methods, no matter how you exercise POI.

Nonetheless, there's value in making it clear that code is not broken, so I
have added "assert obj instanceof <MyKeyClass>" statements to three of the
equals method, and deleted one which was unused (svn r824972 ). This change
should have negligible performance impact and should also suppress the code
checker warning.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message