directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Arnaud Marcelot (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSTUDIO-426) Overwritten hashCode() method should not use super.hashCode()
Date Fri, 06 Mar 2009 09:23:58 GMT

    [ https://issues.apache.org/jira/browse/DIRSTUDIO-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679538#action_12679538
] 

Pierre-Arnaud Marcelot commented on DIRSTUDIO-426:
--------------------------------------------------

Actually I'm wondering if this really makes sense to do what I propose on the classes I listed...

These classes are all extending a more abstract class, which has its own specific fields,

If we're not using super.hashCode() anymore, we'll loose some computation done on the fields
of this extended classes and maybe we'll not get the result we want, letting 2 objects with
different fields values (for the fields of the extended class) have the same hashCode().

I can't really remember what made create this JIRA a few months ago, and I'm not sure now
if it really makes sense...

> Overwritten hashCode() method should not use super.hashCode()
> -------------------------------------------------------------
>
>                 Key: DIRSTUDIO-426
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-426
>             Project: Directory Studio
>          Issue Type: Improvement
>          Components: studio-ldapbrowser, studio-schemaeditor
>    Affects Versions: 1.3.0
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Pierre-Arnaud Marcelot
>             Fix For: 1.3.1, 1.4.0
>
>
> Overwritten hashCode() method should not use super.hashCode() because it can cause issues
if two objects are equals but does not have the same hashCode.
> This problem impacts the following classes:
>     * /ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/StudioPagedResultsControl.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/AttributeTypeWrapper.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/Folder.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ObjectClassWrapper.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ProjectWrapper.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaErrorWrapper.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWarningWrapper.java
>     * /schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/SchemaWrapper.java

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


Mime
View raw message