You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/03/14 17:23:20 UTC

[commons-lang] branch master updated: LANG-1643 : init ArrayList with good default size (#1041)

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


The following commit(s) were added to refs/heads/master by this push:
     new 4ebef61c0 LANG-1643 : init ArrayList with good default size (#1041)
4ebef61c0 is described below

commit 4ebef61c03ed1beb6747158170618296dec88a0e
Author: laurentschoelens <61...@users.noreply.github.com>
AuthorDate: Tue Mar 14 18:23:11 2023 +0100

    LANG-1643 : init ArrayList with good default size (#1041)
    
    Co-authored-by: Laurent SCHOELENS <la...@sfr.com>
---
 src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
index ae321c9fe..8e26a0925 100644
--- a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
@@ -214,7 +214,7 @@ public class EqualsBuilder implements Builder<Boolean> {
      */
     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
     }