You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by dj...@apache.org on 2014/09/10 13:32:53 UTC

svn commit: r1623970 - in /commons/proper/lang/trunk/src: changes/changes.xml main/java/org/apache/commons/lang3/builder/EqualsBuilder.java

Author: djones
Date: Wed Sep 10 11:32:53 2014
New Revision: 1623970

URL: http://svn.apache.org/r1623970
Log:
Fix for LANG-1035: Javadoc for EqualsBuilder.reflectionEquals() is unclear

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java

Modified: commons/proper/lang/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/changes/changes.xml?rev=1623970&r1=1623969&r2=1623970&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/lang/trunk/src/changes/changes.xml [utf-8] Wed Sep 10 11:32:53 2014
@@ -22,6 +22,7 @@
   <body>
 
   <release version="3.4" date="tba" description="tba">
+  	<action issue="LANG-1035" type="fix" dev="djones">Javadoc for EqualsBuilder.reflectionEquals() is unclear</action>
     <action issue="LANG-1020" type="update" dev="britter" due-to="Libor Ondrusek">Improve performance of normalize space</action>
     <action issue="LANG-1033" type="add" dev="ggregory">Add StringUtils.countMatches(CharSequence, char)</action>
     <action issue="LANG-1027" type="update" dev="rmannibucau">org.apache.commons.lang3.SystemUtils#isJavaVersionAtLeast should return true by default</action>

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java?rev=1623970&r1=1623969&r2=1623970&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java Wed Sep 10 11:32:53 2014
@@ -68,7 +68,8 @@ import org.apache.commons.lang3.tuple.Pa
  * <code>reflectionEquals</code>, uses <code>AccessibleObject.setAccessible</code> to
  * change the visibility of the fields. This will fail under a security
  * manager, unless the appropriate permissions are set up correctly. It is
- * also slower than testing explicitly.</p>
+ * also slower than testing explicitly.  Non-primitive fields are compared using 
+ * <code>equals()</code>.</p>
  *
  * <p> A typical invocation for this method would look like:</p>
  * <pre>
@@ -232,8 +233,9 @@ public class EqualsBuilder implements Bu
      * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
      * fields. This means that it will throw a security exception if run under
      * a security manager, if the permissions are not set up correctly. It is also
-     * not as efficient as testing explicitly.</p>
-     *
+     * not as efficient as testing explicitly. Non-primitive fields are compared using 
+     * <code>equals()</code>.</p>
+     * 
      * <p>Transient members will be not be tested, as they are likely derived
      * fields, and not part of the value of the Object.</p>
      *
@@ -255,7 +257,8 @@ public class EqualsBuilder implements Bu
      * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
      * fields. This means that it will throw a security exception if run under
      * a security manager, if the permissions are not set up correctly. It is also
-     * not as efficient as testing explicitly.</p>
+     * not as efficient as testing explicitly. Non-primitive fields are compared using 
+     * <code>equals()</code>.</p>
      *
      * <p>Transient members will be not be tested, as they are likely derived
      * fields, and not part of the value of the Object.</p>
@@ -278,7 +281,8 @@ public class EqualsBuilder implements Bu
      * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
      * fields. This means that it will throw a security exception if run under
      * a security manager, if the permissions are not set up correctly. It is also
-     * not as efficient as testing explicitly.</p>
+     * not as efficient as testing explicitly. Non-primitive fields are compared using 
+     * <code>equals()</code>.</p>
      *
      * <p>If the TestTransients parameter is set to <code>true</code>, transient
      * members will be tested, otherwise they are ignored, as they are likely
@@ -302,7 +306,8 @@ public class EqualsBuilder implements Bu
      * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private
      * fields. This means that it will throw a security exception if run under
      * a security manager, if the permissions are not set up correctly. It is also
-     * not as efficient as testing explicitly.</p>
+     * not as efficient as testing explicitly. Non-primitive fields are compared using 
+     * <code>equals()</code>.</p>
      *
      * <p>If the testTransients parameter is set to <code>true</code>, transient
      * members will be tested, otherwise they are ignored, as they are likely