[ 
https://issues.apache.org/jira/browse/BEANUTILS-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton updated BEANUTILS-212:
--------------------------------------

    Affects Version/s:     (was: Nightly Builds)
                       1.7.0
        Fix Version/s:     (was: 1.8.0)
                       LATER THAN 1.8.0

A few comments:

* I've applied the patch from BEANUTILS-233 which adds hashcode() and equals() 
implementations to DynaProperty.
* DynaUtils.buildHashCode(DynaBean) will throw a null pointer exception if the 
property value is null
* DynaUtils.buildHashCode(DynaBean) doesn't take into account the DynaBean 
implementation - seems to me like it should?
* DynaUtils.buildHashCode(DynaClass) doesn't take into account the DynaClass 
implementation - seems to me like it should?

I also think that implementing toString() is best done by the person using it - 
since how muchof little information they would want and the format is very much 
down to how its being used. Lang has a whole set of string builder classes 
which do this sort of thing so I'm inclinded to not implement any of this. 
Personally I have my own custom impl. that does this.

The other part of the problem is I don't understand the implications of 
hashCode() enough and my big fear is that it would screw things up - so I'm 
going to punt this for now to post 1.8.0. Apologies if, due to my 
shortcommings, this is annoying.


> [beanutils] Generic implementations of toString, hashCode, equals() for 
> DynaBean and DynaClass
> ----------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-212
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-212
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: DynaBean
>    Affects Versions: 1.7.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Kris Nuttycombe
>            Priority: Minor
>             Fix For: LATER THAN 1.8.0
>
>         Attachments: AbstractDynaBean.java, AbstractDynaClass.java, 
> DynaUtils.java, patch.txt
>
>
> This patchset includes a new DynaUtils class containing builder methods for 
> hash
> codes and string representations of DynaBeans and DynaClasses, abstract base
> classes for DynaBean and DynaClass that use DynaUtils to implement these
> methods, and patches for existing DynaBean and DynaClass implementations to 
> make
> them extend these abstract base classes.
> Kris

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to