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 8c1939abcc7654aefc92963e6b6715a3b5bbd663 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed May 22 08:38:21 2024 -0400 Fix PMD UnnecessaryFullyQualifiedName in AbstractHashedMap --- src/changes/changes.xml | 1 + .../org/apache/commons/collections4/map/AbstractHashedMap.java | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index afddf0071..8062d7467 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -37,6 +37,7 @@ <action type="update" dev="ggregory" due-to="PMD, Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in PredicateUtils.</action> <action type="update" dev="ggregory" due-to="PMD, Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in TransformerUtils.</action> <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> <!-- 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/map/AbstractHashedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java index 71394f28d..e1cec999f 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java @@ -251,7 +251,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab } final HashEntry<K, V> newCurrent = next; if (newCurrent == null) { - throw new NoSuchElementException(AbstractHashedMap.NO_NEXT_ENTRY); + throw new NoSuchElementException(NO_NEXT_ENTRY); } final HashEntry<K, V>[] data = parent.data; int i = hashIndex; @@ -267,7 +267,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab public void remove() { if (last == null) { - throw new IllegalStateException(AbstractHashedMap.REMOVE_INVALID); + throw new IllegalStateException(REMOVE_INVALID); } if (parent.modCount != expectedModCount) { throw new ConcurrentModificationException(); @@ -301,7 +301,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab public K getKey() { final HashEntry<K, V> current = currentEntry(); if (current == null) { - throw new IllegalStateException(AbstractHashedMap.GETKEY_INVALID); + throw new IllegalStateException(GETKEY_INVALID); } return current.getKey(); } @@ -310,7 +310,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab public V getValue() { final HashEntry<K, V> current = currentEntry(); if (current == null) { - throw new IllegalStateException(AbstractHashedMap.GETVALUE_INVALID); + throw new IllegalStateException(GETVALUE_INVALID); } return current.getValue(); } @@ -324,7 +324,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab public V setValue(final V value) { final HashEntry<K, V> current = currentEntry(); if (current == null) { - throw new IllegalStateException(AbstractHashedMap.SETVALUE_INVALID); + throw new IllegalStateException(SETVALUE_INVALID); } return current.setValue(value); }