You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2012/03/15 12:59:51 UTC

Re: svn commit: r1300925 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java

On 15 March 2012 11:26,  <si...@apache.org> wrote:
> Author: simonetripodi
> Date: Thu Mar 15 11:26:25 2012
> New Revision: 1300925
>
> URL: http://svn.apache.org/viewvc?rev=1300925&view=rev
> Log:
> just incrementally built the hashcode in the constructor
>

I wondered why you did not use the java.lang.String approach, but I
see the class is used in a HashMap so the hashCode will always be
needed.
Might be an idea to note this in the ctor?

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


Re: svn commit: r1300925 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java

Posted by Benedikt Ritter <be...@googlemail.com>.
Am 15. März 2012 12:59 schrieb sebb <se...@gmail.com>:
> On 15 March 2012 11:26,  <si...@apache.org> wrote:
>> Author: simonetripodi
>> Date: Thu Mar 15 11:26:25 2012
>> New Revision: 1300925
>>
>> URL: http://svn.apache.org/viewvc?rev=1300925&view=rev
>> Log:
>> just incrementally built the hashcode in the constructor
>>
>
> I wondered why you did not use the java.lang.String approach, but I
> see the class is used in a HashMap so the hashCode will always be
> needed.
> Might be an idea to note this in the ctor?
>

AccessibleObjectDescriptor is a nested private class of the package
private AccessibleObjectRegistry. So users will never create
AccessibleObjectDescriptors. The class comment says "Represents the
key to looking up an AccessibleObject by reflection."
Would be a bit redundant to add yet another comment to the constructor.

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

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