elharo commented on code in PR #1114:
URL: https://github.com/apache/commons-lang/pull/1114#discussion_r1342594321


##########
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java:
##########
@@ -195,10 +195,10 @@ private static void unregister(final Object lhs, final 
Object rhs) {
     }
 
     /**
-     * If the fields tested are equals.
+     * If the fields tested are equal
      * The default value is {@code true}.
      */
-    private boolean isEquals = true;
+    protected boolean isEquals = true;

Review Comment:
   private please. Use getters/setters if needed



##########
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java:
##########
@@ -195,10 +195,10 @@ private static void unregister(final Object lhs, final 
Object rhs) {
     }
 
     /**
-     * If the fields tested are equals.
+     * If the fields tested are equal

Review Comment:
   missing punctuation, sentence fragment



##########
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java:
##########
@@ -450,6 +450,15 @@ public static boolean reflectionEquals(final Object lhs, 
final Object rhs, final
                     .isEquals();
     }
 
+    /**
+     * Indicates if we should interrupt the comparison during an appending.
+     *
+     * @return true if the equality is false
+     */
+    protected boolean interruptEqualityCheck() {
+        return !isEquals;
+    }
+
     /**
      * Tests if two {@code objects} by using reflection.

Review Comment:
   sentence fragment



##########
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java:
##########
@@ -450,6 +450,15 @@ public static boolean reflectionEquals(final Object lhs, 
final Object rhs, final
                     .isEquals();
     }
 
+    /**
+     * Indicates if we should interrupt the comparison during an appending.

Review Comment:
   third person, or second person if you must. Tech docs should never be second 
person plural



##########
src/main/java/org/apache/commons/lang3/builder/TypedEqualsBuilder.java:
##########
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.lang3.builder;
+
+import org.apache.commons.lang3.function.FailableFunction;
+
+import java.util.Objects;
+import java.util.function.Function;
+
+/**
+ * An extension of {@link EqualsBuilder} that is typed and meant to append 
field getter functions.

Review Comment:
   Needs a rewrite



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to