You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2010/01/02 00:05:48 UTC
svn commit: r895089 - /maven/maven-3/trunk/maven-model/src/main/mdo/maven.mdo
Author: hboutemy
Date: Fri Jan 1 23:05:47 2010
New Revision: 895089
URL: http://svn.apache.org/viewvc?rev=895089&view=rev
Log:
[MNG-3266] make RepositoryBase override not only equals() but hashCode() too (merged from 2.2.x branch r895088)
Submitted by: Jared Roberts
Modified:
maven/maven-3/trunk/maven-model/src/main/mdo/maven.mdo
Modified: maven/maven-3/trunk/maven-model/src/main/mdo/maven.mdo
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model/src/main/mdo/maven.mdo?rev=895089&r1=895088&r2=895089&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model/src/main/mdo/maven.mdo (original)
+++ maven/maven-3/trunk/maven-model/src/main/mdo/maven.mdo Fri Jan 1 23:05:47 2010
@@ -2357,6 +2357,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
@@ -2396,40 +2397,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;
- }
-
- @Override
- public String toString()
- {
- return ( getId() != null ) ? getId() : "[null]";
- }
- ]]>
- </code>
- </codeSegment>
- </codeSegments>
</class>
<class>
@@ -2456,23 +2423,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>
@@ -2491,23 +2441,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 java.clone="deep">