[
https://issues.apache.org/jira/browse/ODE-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832311#action_12832311
]
David Carver commented on ODE-751:
----------------------------------
Sure, I can clean up the attachments. Here is a suggestion. Download and
install FindBugs...
http://findbugs.sourceforge.net/
Many of the patches for the equals and hashcode actually should be done because
with out them, you are depending on the parent's equal or hashcode to determine
if something is equal or not. If the parent overrides the Object equal method,
then the Child also needs to override the method and provide it's own
implementation.
There were also several issues with various equal statements, in particular
this bug:
http://findbugs.sourceforge.net/bugDescriptions.html#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS
Which the equal statements were automatically doing Casts to a specific object
type, which would have tossed a ClassCastException instead of returning false,
if the cast wasn't successful.
I had originally wanted to do smaller patches for specific bugs, to make it
easier to test, and implement in general. Plus this would allow for easier
debugging when a test case fails. One large patch doesn't allow this type of
testing.
Also many of the patches fix issues with:
http://findbugs.sourceforge.net/bugDescriptions.html#HE_EQUALS_NO_HASHCODE
http://findbugs.sourceforge.net/bugDescriptions.html#HE_INHERITS_EQUALS_USE_HASHCODE
http://findbugs.sourceforge.net/bugDescriptions.html#HE_HASHCODE_USE_OBJECT_EQUALS
http://findbugs.sourceforge.net/bugDescriptions.html#HE_HASHCODE_NO_EQUALS
The best thing to do though is to install FindBugs, run it against the code,
and we can determine which are the critical bugs to fix, and which are ones we
can safely ignore.
> FindBugs Patches for ODE Runtime
> --------------------------------
>
> Key: ODE-751
> URL: https://issues.apache.org/jira/browse/ODE-751
> Project: ODE
> Issue Type: Bug
> Components: BPEL Runtime
> Environment: linux
> Reporter: David Carver
> Assignee: Rafal Rusin
> Attachments: ode-751-patch.txt
>
>
> Running FindBugs (http://findbugs.sourceforge.net/) against the bpel-api
> project, the following error:
> Equals method for org.apache.ode.bpel.iapi.Endpoint assumes the argument is
> of type Endpoint
> Will attach a patch to correct these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.