You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/07 22:53:29 UTC

svn commit: r674633 - /myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java

Author: skitching
Date: Mon Jul  7 13:53:28 2008
New Revision: 674633

URL: http://svn.apache.org/viewvc?rev=674633&view=rev
Log:
Add hashCode method to class, as equals has been overridden.
Issue pointed out by CheckStyle.

Modified:
    myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java?rev=674633&r1=674632&r2=674633&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java Mon Jul  7 13:53:28 2008
@@ -668,6 +668,15 @@
       return (o instanceof GroupComparator);
     }
 
+    public int hashCode()
+    {
+      // Yes, this is a very strange hashCode implementation. But the
+      // equals method is also very strange; any two GroupComparator
+      // objects are always equal. Therefore by the java rules, any
+      // two GroupComparator objects must always have the same hashCode.
+      return 17;  // an arbitrary constant.
+    }
+
     private int _getGroupIndex(Object o)
     {
       String s = (o == null) ? null : o.toString();