maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject [39/50] git commit: [MNG-3266] make RepositoryBase override not only equals() but hashCode() too Submitted by: Jared Roberts
Date Sat, 01 Dec 2012 10:39:58 GMT
[MNG-3266] make RepositoryBase override not only equals() but hashCode() too
Submitted by: Jared Roberts

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-2/branches/maven-2.2.x@895088 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5c6e9e70
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5c6e9e70
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5c6e9e70

Branch: refs/heads/maven-2.2.x
Commit: 5c6e9e7028b88b911e654d6578be832822c7568f
Parents: ffc7708
Author: Herve Boutemy <hboutemy@apache.org>
Authored: Fri Jan 1 22:59:50 2010 +0000
Committer: Herve Boutemy <hboutemy@apache.org>
Committed: Fri Jan 1 22:59:50 2010 +0000

----------------------------------------------------------------------
 maven-model/src/main/mdo/maven.mdo |   62 +------------------------------
 1 files changed, 1 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5c6e9e70/maven-model/src/main/mdo/maven.mdo
----------------------------------------------------------------------
diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo
index 57d86c4..a343869 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -2283,6 +2283,7 @@
           <name>id</name>
           <version>4.0.0</version>
           <required>true</required>
+          <identifier>true</identifier>
           <description>
             <![CDATA[
             A unique identifier for a repository. This is used to match the repository
@@ -2322,33 +2323,6 @@
           <defaultValue>default</defaultValue>
         </field>
       </fields>
-      <codeSegments>
-        <codeSegment>
-          <version>4.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj )
-    {
-        if ( obj instanceof RepositoryBase ) {
-
-            final RepositoryBase other =  (RepositoryBase) obj;
-
-            if ( id != null )
-            {
-                return id.equals( other.id );
-            }
-            return super.equals(obj);
-        }
-
-        return false;
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
     </class>
 
     <class>
@@ -2375,23 +2349,6 @@
           </association>
         </field>
       </fields>
-      <!-- TODO:prevent modello generation of an incorrect equals method. Could be avoided
by using <identity/> tags to mark ID as the only identity field -->
-      <codeSegments>
-        <codeSegment>
-          <version>4.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj )
-    {
-        return super.equals( obj );
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
     </class>
 
     <class>
@@ -2410,23 +2367,6 @@
           <version>4.0.0</version>
         </field>
       </fields>
-      <!-- TODO:prevent modello generation of an incorrect equals method. Could be avoided
by using <identity/> tags to mark ID as the only identity field -->
-      <codeSegments>
-        <codeSegment>
-          <version>4.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj )
-    {
-        return super.equals( obj );
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
     </class>
 
     <class>


Mime
View raw message