LANG-1643 : init ArrayList with good default size (#1041)

Co-authored-by: Laurent SCHOELENS <laurent.schoelens@sfr.com>
This commit is contained in:
laurentschoelens 2023-03-14 18:23:11 +01:00 committed by GitHub
parent 4e8d9d39f1
commit 4ebef61c03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ private static void unregister(final Object lhs, final Object rhs) {
*/
public EqualsBuilder() {
// set up default classes to bypass reflection for
bypassReflectionClasses = new ArrayList<>();
bypassReflectionClasses = new ArrayList<>(1);
bypassReflectionClasses.add(String.class); //hashCode field being lazy but not transient
}