This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 7d8701ebf46755b9a8639aa4dc392f06ed10d57c
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Aug 26 14:43:02 2022 -0400

    Sort members
---
 .../commons/lang3/builder/HashCodeBuilder.java     | 80 +++++++++++-----------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java 
b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
index bf33b850e..e8e603998 100644
--- a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java
@@ -789,37 +789,6 @@ public class HashCodeBuilder implements Builder<Integer> {
         return this;
     }
 
-    /**
-     * Append a {@code hashCode} for an array.
-     *
-     * @param object
-     *            the array to add to the {@code hashCode}
-     */
-    private void appendArray(final Object object) {
-        // 'Switch' on type of array, to dispatch to the correct handler
-        // This handles multidimensional arrays
-        if (object instanceof long[]) {
-            append((long[]) object);
-        } else if (object instanceof int[]) {
-            append((int[]) object);
-        } else if (object instanceof short[]) {
-            append((short[]) object);
-        } else if (object instanceof char[]) {
-            append((char[]) object);
-        } else if (object instanceof byte[]) {
-            append((byte[]) object);
-        } else if (object instanceof double[]) {
-            append((double[]) object);
-        } else if (object instanceof float[]) {
-            append((float[]) object);
-        } else if (object instanceof boolean[]) {
-            append((boolean[]) object);
-        } else {
-            // Not an array of primitives
-            append((Object[]) object);
-        }
-    }
-
     /**
      * Append a {@code hashCode} for an {@link Object} array.
      *
@@ -868,6 +837,37 @@ public class HashCodeBuilder implements Builder<Integer> {
         return this;
     }
 
+    /**
+     * Append a {@code hashCode} for an array.
+     *
+     * @param object
+     *            the array to add to the {@code hashCode}
+     */
+    private void appendArray(final Object object) {
+        // 'Switch' on type of array, to dispatch to the correct handler
+        // This handles multidimensional arrays
+        if (object instanceof long[]) {
+            append((long[]) object);
+        } else if (object instanceof int[]) {
+            append((int[]) object);
+        } else if (object instanceof short[]) {
+            append((short[]) object);
+        } else if (object instanceof char[]) {
+            append((char[]) object);
+        } else if (object instanceof byte[]) {
+            append((byte[]) object);
+        } else if (object instanceof double[]) {
+            append((double[]) object);
+        } else if (object instanceof float[]) {
+            append((float[]) object);
+        } else if (object instanceof boolean[]) {
+            append((boolean[]) object);
+        } else {
+            // Not an array of primitives
+            append((Object[]) object);
+        }
+    }
+
     /**
      * Adds the result of super.hashCode() to this builder.
      *
@@ -881,15 +881,6 @@ public class HashCodeBuilder implements Builder<Integer> {
         return this;
     }
 
-    /**
-     * Returns the computed {@code hashCode}.
-     *
-     * @return {@code hashCode} based on the fields appended
-     */
-    public int toHashCode() {
-        return iTotal;
-    }
-
     /**
      * Returns the computed {@code hashCode}.
      *
@@ -915,4 +906,13 @@ public class HashCodeBuilder implements Builder<Integer> {
         return toHashCode();
     }
 
+    /**
+     * Returns the computed {@code hashCode}.
+     *
+     * @return {@code hashCode} based on the fields appended
+     */
+    public int toHashCode() {
+        return iTotal;
+    }
+
 }

Reply via email to