[forge-issues] [JBoss JIRA] (FORGE-1005) Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations

Vineet Reynolds (JIRA) jira-events at lists.jboss.org
Thu Jul 11 07:59:21 EDT 2013


    [ https://issues.jboss.org/browse/FORGE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789083#comment-12789083 ] 

Vineet Reynolds commented on FORGE-1005:
----------------------------------------

Also added support for generating {{equals()}} and {{hashCode()}} methods that consider all primitives and array types. Enhanced the Java Parser API with additional methods (that dont break compatibility) to aid in these.
                
> Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: FORGE-1005
>                 URL: https://issues.jboss.org/browse/FORGE-1005
>             Project: Forge
>          Issue Type: Enhancement
>          Components: Parsers / File Manipulation
>    Affects Versions: 1.3.3.Final
>            Reporter: Vineet Reynolds
>            Assignee: Vineet Reynolds
>
> The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
> Additionally, primitive types like {{float}} and {{double}} need to be treated differently for both {{equals}} and {{hashCode}} implementations, while {{boolean}} and {{long}} need to be treated differently for {{hashCode}} implementations.
> Arrays also need to be considered for both {{equals}} and {{hashCode}} implementations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the forge-issues mailing list