commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r588536 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
Date Fri, 26 Oct 2007 06:14:11 GMT
Author: bayard
Date: Thu Oct 25 23:14:10 2007
New Revision: 588536

URL: http://svn.apache.org/viewvc?rev=588536&view=rev
Log:
Applying the javadoc sample usage change from LANG-353 as reported by Christoph Kutzinski

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java?rev=588536&r1=588535&r2=588536&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
Thu Oct 25 23:14:10 2007
@@ -46,11 +46,10 @@
  * <p>Typical use for the code is as follows:</p>
  * <pre>
  * public boolean equals(Object obj) {
- *   if (obj instanceof MyClass == false) {
+ *   if (obj == null) { return false; }
+ *   if (obj == this) { return true; }
+ *   if (obj.getClass() == getClass()) {
  *     return false;
- *   }
- *   if (this == obj) {
- *     return true;
  *   }
  *   MyClass rhs = (MyClass) obj;
  *   return new EqualsBuilder()



Mime
View raw message