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 2024/05/22 12:57:53 UTC
(commons-collections) 09/16: Fix PMD UnnecessaryFullyQualifiedName in IndexUtils
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-collections.git
commit 1fe47c017425f1b131b0a44d00058783b51b1a2e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed May 22 08:42:01 2024 -0400
Fix PMD UnnecessaryFullyQualifiedName in IndexUtils
---
src/changes/changes.xml | 1 +
.../java/org/apache/commons/collections4/bloomfilter/IndexUtils.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 69812d682..72f438696 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -39,6 +39,7 @@
<action type="update" dev="ggregory" due-to="PMD, Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in DefaultEquator.</action>
<action type="update" dev="ggregory" due-to="PMD, Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in AbstractHashedMap.</action>
<action type="update" dev="ggregory" due-to="PMD, Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in StringKeyAnalyzer.</action>
+ <action type="update" dev="ggregory" due-to="PMD, Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in IndexUtils.</action>
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Dependabot">Bump org.apache.commons:commons-parent from 67 to 69 #473.</action>
<action type="update" dev="ggregory" due-to="Dependabot">Bump tests commons-io:commons-io from 2.16.0 to 2.16.1 #475.</action>
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/IndexUtils.java b/src/main/java/org/apache/commons/collections4/bloomfilter/IndexUtils.java
index 3c835ea57..10537e91b 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/IndexUtils.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/IndexUtils.java
@@ -37,7 +37,7 @@ final class IndexUtils {
*/
static int[] ensureCapacityForAdd(final int[] array, final int index) {
if (index >= array.length) {
- return Arrays.copyOf(array, (int) Math.min(IndexUtils.MAX_ARRAY_SIZE, Math.max(array.length * 2L, index + 1)));
+ return Arrays.copyOf(array, (int) Math.min(MAX_ARRAY_SIZE, Math.max(array.length * 2L, index + 1)));
}
return array;
}