[
https://issues.apache.org/jira/browse/DIRAPI-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18019523#comment-18019523
]
Emmanuel Lécharny commented on DIRAPI-424:
------------------------------------------
It's a bit more complex that that: the {{AttributeType}} inherits from the
{{AbstractSchemaObject}} which already keep a computed hash value, except that
this hash value is not recomputed when the {{AttributeType}} instance get
modified, which is badly wrong...
> The AttributeType hashCode method can use a pre-computed value
> --------------------------------------------------------------
>
> Key: DIRAPI-424
> URL: https://issues.apache.org/jira/browse/DIRAPI-424
> Project: Directory Client API
> Issue Type: Improvement
> Reporter: Emmanuel Lécharny
> Priority: Minor
>
> When we call the {{hashCode()}} method, it computes the hashcode, which is
> expected. Except that an {{AttributeType}} instance is pretty much immutable.
> So we could spare some CPU by using a static value that will hold the hash
> code, and rehash if needed in the setters
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]