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 2026/07/09 23:48:00 UTC
(commons-collections) branch master updated (28a7cadde -> aefeb34f9)
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
from 28a7cadde Add missing Javadoc and tags.
new be7f08a4b Inline single-use local variable.
new b6d5d78eb Add missing Javadoc and tags.
new 4fc131d11 Inline single-use local variable.
new eb43fa67a Add missing Javadoc and tags.
new 6dab3336f Add missing Javadoc and tags.
new 19785746c Add missing Javadoc and tags.
new 44ad5537f Better Javadoc
new bece60af1 Add missing Javadoc and tags.
new a550fb3e0 Better Javadoc
new 2ff93fb8c Better Javadoc
new acc63f467 Better Javadoc
new 3414ef9fb Better Javadoc
new b34feb65a Add missing Javadoc and tags.
new f5e158b7c Better Javadoc
new af6d29536 Better Javadoc
new fdd801e1a Add missing Javadoc and tags.
new 6c16ca019 Add missing Javadoc and tags.
new c03e4856f Add missing Javadoc and tags.
new 9d8665061 Add missing Javadoc and tags.
new b9775182f Add missing Javadoc and tags.
new f5db77e1b Add missing Javadoc and tags.
new 4bcf30fc4 Add missing Javadoc and tags.
new 3aa611c16 Inline single-use local variable.
new 8c314877a Inline single-use local variable.
new 379517a95 Add missing Javadoc and tags.
new 5a4fd8bd9 Inline single-use local variable.
new 772843b66 Add missing Javadoc and tags.
new 541f38a30 Add missing Javadoc and tags.
new 3bde84b73 Add missing Javadoc and tags.
new 9274f7d22 Add missing Javadoc and tags.
new 604b11e19 Add missing Javadoc and tags.
new cd4ded391 Inline single-use local variable.
new 22b084710 Add missing Javadoc and tags.
new e6398e588 Inline single-use local variables.
new ce58b94fd Add missing Javadoc and tags.
new 0dcf60c39 Add missing Javadoc and tags.
new abaa952d1 Add missing Javadoc and tags.
new 6a0a90f58 Add missing Javadoc and tags.
new db49091f4 Add missing Javadoc and tags.
new a922663b1 Inline single-use local variables.
new 6343b5dae Add missing Javadoc and tags.
new c4b50063a Add missing Javadoc and tags.
new 79e771c7d Inline single-use local variables.
new 14250d644 Add missing Javadoc and tags.
new 4566cdaa4 Add missing Javadoc and tags.
new 875aa0373 Inline single-use local variables.
new fbf71b743 Inline single-use local variables.
new 8b5dbb8ba Add missing Javadoc and tags.
new aefeb34f9 Add missing Javadoc and tags.
The 49 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../commons/collections4/MultiValuedMap.java | 7 +--
.../apache/commons/collections4/SplitMapUtils.java | 69 +++++++++++++++++++++-
.../commons/collections4/bag/UnmodifiableBag.java | 10 ++++
.../collections4/bag/UnmodifiableSortedBag.java | 10 ++++
.../commons/collections4/bidimap/TreeBidiMap.java | 2 +
.../collections4/bidimap/UnmodifiableBidiMap.java | 8 ++-
.../bidimap/UnmodifiableOrderedBidiMap.java | 33 ++++++++++-
.../bidimap/UnmodifiableSortedBidiMap.java | 30 ++++++++++
.../collection/UnmodifiableBoundedCollection.java | 39 ++++++++++++
.../collection/UnmodifiableCollection.java | 38 ++++++++++++
.../collections4/iterators/ArrayIterator.java | 4 +-
.../iterators/CartesianProductIterator.java | 5 ++
.../collections4/iterators/FilterListIterator.java | 19 +++---
.../collections4/iterators/NodeListIterator.java | 4 +-
.../iterators/ObjectArrayIterator.java | 4 +-
.../iterators/ObjectArrayListIterator.java | 7 +--
.../iterators/PermutationIterator.java | 5 ++
.../collections4/iterators/PushbackIterator.java | 4 +-
.../iterators/SingletonListIterator.java | 6 +-
.../iterators/UnmodifiableIterator.java | 5 ++
.../iterators/UnmodifiableListIterator.java | 17 ++++++
.../iterators/UnmodifiableMapIterator.java | 11 ++++
.../iterators/UnmodifiableOrderedMapIterator.java | 11 ++++
.../commons/collections4/list/FixedSizeList.java | 5 ++
.../commons/collections4/list/SetUniqueList.java | 6 ++
.../collections4/list/UnmodifiableList.java | 69 +++++++++++++++++++++-
.../map/ConcurrentReferenceHashMap.java | 6 ++
.../commons/collections4/map/FixedSizeMap.java | 14 ++++-
.../collections4/map/FixedSizeSortedMap.java | 11 ++++
.../apache/commons/collections4/map/LinkedMap.java | 33 +++++++++++
.../commons/collections4/map/SingletonMap.java | 21 +++++--
.../collections4/map/UnmodifiableEntrySet.java | 55 +++++++++++++++++
.../commons/collections4/map/UnmodifiableMap.java | 30 ++++++++--
.../collections4/map/UnmodifiableOrderedMap.java | 33 +++++++++--
.../collections4/map/UnmodifiableSortedMap.java | 24 ++++++++
.../multimap/AbstractMultiValuedMap.java | 6 ++
.../multimap/UnmodifiableMultiValuedMap.java | 43 ++++++++++++++
.../collections4/multiset/AbstractMultiSet.java | 14 +++++
.../multiset/UnmodifiableMultiSet.java | 66 +++++++++++++++++++--
.../collections4/queue/UnmodifiableQueue.java | 55 +++++++++++++++++
.../collections4/set/UnmodifiableNavigableSet.java | 63 ++++++++++++++++----
.../commons/collections4/set/UnmodifiableSet.java | 39 ++++++++++++
.../collections4/set/UnmodifiableSortedSet.java | 47 +++++++++++++--
.../collections4/trie/UnmodifiableTrie.java | 24 ++++++++
44 files changed, 940 insertions(+), 72 deletions(-)
(commons-collections) 47/49: Inline single-use local variables.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit fbf71b74369874329460290b406c5837b1ee4728
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:41:30 2026 -0400
Inline single-use local variables.
---
.../collections4/trie/UnmodifiableTrie.java | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java b/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java
index c5591052a..156ee17be 100644
--- a/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java
+++ b/src/main/java/org/apache/commons/collections4/trie/UnmodifiableTrie.java
@@ -78,6 +78,11 @@ public class UnmodifiableTrie<K, V> implements Trie<K, V>, Serializable, Unmodif
this.delegate = tmpTrie;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -164,16 +169,35 @@ public class UnmodifiableTrie<K, V> implements Trie<K, V>, Serializable, Unmodif
return delegate.previousKey(key);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param m Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void putAll(final Map<? extends K, ? extends V> m) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
(commons-collections) 12/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 3414ef9fb4edbbc6c0c89a1e34ad76215dc854ea
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:04:29 2026 -0400
Better Javadoc
---
.../commons/collections4/iterators/ObjectArrayListIterator.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java
index 69a6e275a..ce8241d62 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayListIterator.java
@@ -88,11 +88,10 @@ public class ObjectArrayListIterator<E> extends ObjectArrayIterator<E>
}
/**
- * This iterator does not support modification of its backing array's size, and so will
- * always throw an {@link UnsupportedOperationException} when this method is invoked.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @param obj the object to add
- * @throws UnsupportedOperationException always thrown.
+ * @param obj Ignored.
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void add(final E obj) {
(commons-collections) 31/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 604b11e19b0fb08e91cfb88e81debda0e4b24014
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:26:03 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/map/UnmodifiableMap.java | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
index 0942c1af0..c522ca38c 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
@@ -82,6 +82,11 @@ public final class UnmodifiableMap<K, V>
super((Map<K, V>) map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -109,11 +114,24 @@ public final class UnmodifiableMap<K, V>
return UnmodifiableMapIterator.unmodifiableMapIterator(it);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param mapToCopy Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void putAll(final Map<? extends K, ? extends V> mapToCopy) {
throw new UnsupportedOperationException();
@@ -133,6 +151,12 @@ public final class UnmodifiableMap<K, V>
map = (Map<K, V>) in.readObject();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
(commons-collections) 37/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit abaa952d1fc8bd3570d815975e13b4cc108e3eb5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:30:56 2026 -0400
Add missing Javadoc and tags.
---
.../multimap/UnmodifiableMultiValuedMap.java | 43 ++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
index e5c00f468..0bb88b190 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/UnmodifiableMultiValuedMap.java
@@ -84,6 +84,11 @@ public final class UnmodifiableMultiValuedMap<K, V>
return UnmodifiableMap.unmodifiableMap(decorated().asMap());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -114,31 +119,69 @@ public final class UnmodifiableMultiValuedMap<K, V>
return UnmodifiableMapIterator.unmodifiableMapIterator(decorated().mapIterator());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param values Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean putAll(final K key, final Iterable<? extends V> values) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param map Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean putAll(final Map<? extends K, ? extends V> map) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param map Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean putAll(final MultiValuedMap<? extends K, ? extends V> map) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public Collection<V> remove(final Object key) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param item Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeMapping(final Object key, final Object item) {
throw new UnsupportedOperationException();
(commons-collections) 48/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 8b5dbb8bab26ca60da837f0099f010720601c72d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:42:28 2026 -0400
Add missing Javadoc and tags.
---
src/main/java/org/apache/commons/collections4/MultiValuedMap.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/MultiValuedMap.java b/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
index d5304c706..49d8fcfe3 100644
--- a/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/MultiValuedMap.java
@@ -141,11 +141,10 @@ public interface MultiValuedMap<K, V> {
Collection<V> get(K key);
/**
- * Returns a new MultiValuedMap with inverted mappings.
- * The new multimap will have a value-to-key mapping
- * for each key-to-value mapping in the original.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @return a new MultiValuedMap with inverted mappings
+ * @return Always throws {@link UnsupportedOperationException}.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.6.0
*/
default MultiValuedMap<V, K> inverted() {
(commons-collections) 49/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit aefeb34f9d59d6120a71897cbdae7e1ce6fa8b68
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:44:15 2026 -0400
Add missing Javadoc and tags.
---
.../apache/commons/collections4/SplitMapUtils.java | 69 +++++++++++++++++++++-
1 file changed, 68 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/collections4/SplitMapUtils.java b/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
index b3a297173..ea8a904d9 100644
--- a/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
+++ b/src/main/java/org/apache/commons/collections4/SplitMapUtils.java
@@ -44,6 +44,11 @@ public class SplitMapUtils {
this.get = get;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -103,13 +108,26 @@ public class SplitMapUtils {
return UnmodifiableMapIterator.unmodifiableMapIterator(it);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param map Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
- public void putAll(final Map<? extends K, ? extends V> t) {
+ public void putAll(final Map<? extends K, ? extends V> map) {
throw new UnsupportedOperationException();
}
@@ -141,16 +159,33 @@ public class SplitMapUtils {
put.clear();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean containsKey(final Object key) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean containsValue(final Object value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public Set<Map.Entry<K, V>> entrySet() {
throw new UnsupportedOperationException();
@@ -164,6 +199,12 @@ public class SplitMapUtils {
return obj instanceof WrappedPut && ((WrappedPut<?, ?>) obj).put.equals(put);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V get(final Object key) {
throw new UnsupportedOperationException();
@@ -174,11 +215,21 @@ public class SplitMapUtils {
return "WrappedPut".hashCode() << 4 | put.hashCode();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean isEmpty() {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public Set<K> keySet() {
throw new UnsupportedOperationException();
@@ -195,16 +246,32 @@ public class SplitMapUtils {
put.putAll(t);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public int size() {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public Collection<V> values() {
throw new UnsupportedOperationException();
(commons-collections) 18/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit c03e4856f79f895de8169dbe3332af7c564d85fc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:16:46 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/iterators/UnmodifiableMapIterator.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
index b69f00208..ef602ed14 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableMapIterator.java
@@ -85,11 +85,22 @@ public final class UnmodifiableMapIterator<K, V> implements MapIterator<K, V>, U
return iterator.next();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException("remove() is not supported");
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V setValue(final V value) {
throw new UnsupportedOperationException("setValue() is not supported");
(commons-collections) 40/49: Inline single-use local variables.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit a922663b1da00c10eeb7fd352b027e2d37ea7d96
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:33:40 2026 -0400
Inline single-use local variables.
---
.../apache/commons/collections4/multiset/UnmodifiableMultiSet.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
index 1b04aefc9..9dd0dbdf8 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
@@ -121,8 +121,7 @@ public final class UnmodifiableMultiSet<E>
@Override
public Set<MultiSet.Entry<E>> entrySet() {
- final Set<MultiSet.Entry<E>> set = decorated().entrySet();
- return UnmodifiableSet.unmodifiableSet(set);
+ return UnmodifiableSet.unmodifiableSet(decorated().entrySet());
}
@Override
@@ -215,8 +214,7 @@ public final class UnmodifiableMultiSet<E>
@Override
public Set<E> uniqueSet() {
- final Set<E> set = decorated().uniqueSet();
- return UnmodifiableSet.unmodifiableSet(set);
+ return UnmodifiableSet.unmodifiableSet(decorated().uniqueSet());
}
/**
(commons-collections) 21/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit f5db77e1bc27ec55f13f95da6edcd583b6faed1a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:17:51 2026 -0400
Add missing Javadoc and tags.
---
.../java/org/apache/commons/collections4/list/SetUniqueList.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java b/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
index d7edd87dd..43b9081b2 100644
--- a/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
+++ b/src/main/java/org/apache/commons/collections4/list/SetUniqueList.java
@@ -127,6 +127,12 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
last = null;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void set(final E object) {
throw new UnsupportedOperationException("ListIterator does not support set");
(commons-collections) 27/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 772843b66840da84edb796a158cecf92c81bd0fe
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:21:17 2026 -0400
Add missing Javadoc and tags.
---
.../apache/commons/collections4/map/FixedSizeSortedMap.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
index 230963bef..0987c78c1 100644
--- a/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java
@@ -90,6 +90,11 @@ public class FixedSizeSortedMap<K, V>
super(map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException("Map is fixed size");
@@ -158,6 +163,12 @@ public class FixedSizeSortedMap<K, V>
map = (Map<K, V>) in.readObject(); // (1)
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException("Map is fixed size");
(commons-collections) 19/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 9d86650610f8aee99424cf1cfc7b48cd3bc71efb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:17:29 2026 -0400
Add missing Javadoc and tags.
---
.../iterators/UnmodifiableOrderedMapIterator.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
index 1d343a536..db4b9f43e 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIterator.java
@@ -96,11 +96,22 @@ public final class UnmodifiableOrderedMapIterator<K, V> implements OrderedMapIte
return iterator.previous();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException("remove() is not supported");
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V setValue(final V value) {
throw new UnsupportedOperationException("setValue() is not supported");
(commons-collections) 16/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit fdd801e1a2dde86a617f6d018c7c3bda81a35e2a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:05:41 2026 -0400
Add missing Javadoc and tags.
---
.../apache/commons/collections4/iterators/UnmodifiableIterator.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
index cef65686b..4f59af9f4 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
@@ -82,6 +82,11 @@ public final class UnmodifiableIterator<E, T extends Iterator<? extends E>> impl
return iterator.next();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
// TODO This method can be removed in 5.0 since it's implemented as a default method in Iterator.
@Override
public void remove() {
(commons-collections) 41/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 6343b5dae5cd210a33cc303650118df2e74e0ceb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:35:51 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/queue/UnmodifiableQueue.java | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/queue/UnmodifiableQueue.java b/src/main/java/org/apache/commons/collections4/queue/UnmodifiableQueue.java
index 4ada8fe4f..faaf5bd35 100644
--- a/src/main/java/org/apache/commons/collections4/queue/UnmodifiableQueue.java
+++ b/src/main/java/org/apache/commons/collections4/queue/UnmodifiableQueue.java
@@ -73,16 +73,33 @@ public final class UnmodifiableQueue<E>
super((Queue<E>) queue);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -93,11 +110,22 @@ public final class UnmodifiableQueue<E>
return UnmodifiableIterator.unmodifiableIterator(decorated().iterator());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param obj Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean offer(final E obj) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public E poll() {
throw new UnsupportedOperationException();
@@ -116,22 +144,43 @@ public final class UnmodifiableQueue<E>
setCollection((Collection<E>) in.readObject());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public E remove() {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -139,6 +188,12 @@ public final class UnmodifiableQueue<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 25/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 379517a95df31aad925a1a662a8dc5d7f1193caf
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:20:35 2026 -0400
Add missing Javadoc and tags.
---
.../org/apache/commons/collections4/map/FixedSizeMap.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
index 414daf72d..208332f92 100644
--- a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
@@ -88,6 +88,11 @@ public class FixedSizeMap<K, V>
super(map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException("Map is fixed size");
@@ -148,6 +153,12 @@ public class FixedSizeMap<K, V>
map = (Map<K, V>) in.readObject(); // (1)
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException("Map is fixed size");
(commons-collections) 24/49: Inline single-use local variable.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 8c314877a61804c0c8dffbad0c91fd1d8d271a43
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:20:13 2026 -0400
Inline single-use local variable.
---
.../apache/commons/collections4/map/ConcurrentReferenceHashMap.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/ConcurrentReferenceHashMap.java b/src/main/java/org/apache/commons/collections4/map/ConcurrentReferenceHashMap.java
index 36c275be6..9b02d61ed 100644
--- a/src/main/java/org/apache/commons/collections4/map/ConcurrentReferenceHashMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/ConcurrentReferenceHashMap.java
@@ -565,6 +565,12 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
return this;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V setValue(final V value) {
throw new UnsupportedOperationException();
(commons-collections) 20/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit b9775182f9c3472174f8a5f64c51c31c5315b18b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:17:34 2026 -0400
Add missing Javadoc and tags.
---
.../java/org/apache/commons/collections4/list/FixedSizeList.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java b/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
index ddd7c5b73..845a2fd41 100644
--- a/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
+++ b/src/main/java/org/apache/commons/collections4/list/FixedSizeList.java
@@ -82,6 +82,11 @@ public class FixedSizeList<E>
return new FixedSizeList<>(list);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
private static UnsupportedOperationException unsupportedOperationException() {
return new UnsupportedOperationException("List is fixed size");
}
(commons-collections) 26/49: Inline single-use local variable.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 5a4fd8bd95d0d9dd975f02615ad509a4b3b55ad1
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:20:49 2026 -0400
Inline single-use local variable.
---
src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
index 208332f92..40bfdcbee 100644
--- a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java
@@ -166,8 +166,7 @@ public class FixedSizeMap<K, V>
@Override
public Collection<V> values() {
- final Collection<V> coll = map.values();
- return UnmodifiableCollection.unmodifiableCollection(coll);
+ return UnmodifiableCollection.unmodifiableCollection(map.values());
}
/**
(commons-collections) 17/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 6c16ca019f13cff5d8e07ff3f5b4bca8fad34dbf
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:16:40 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/bag/UnmodifiableBag.java | 10 ++++++++++
.../commons/collections4/bag/UnmodifiableSortedBag.java | 10 ++++++++++
.../commons/collections4/bidimap/TreeBidiMap.java | 2 ++
.../collections4/bidimap/UnmodifiableBidiMap.java | 5 +++++
.../bidimap/UnmodifiableOrderedBidiMap.java | 5 +++++
.../collections4/bidimap/UnmodifiableSortedBidiMap.java | 5 +++++
.../collection/UnmodifiableBoundedCollection.java | 6 ++++++
.../collections4/collection/UnmodifiableCollection.java | 5 +++++
.../iterators/UnmodifiableListIterator.java | 17 +++++++++++++++++
9 files changed, 65 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
index 2615ba75a..db4831d55 100644
--- a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableBag.java
@@ -81,6 +81,7 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -91,6 +92,8 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
+ * @param count Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -101,6 +104,7 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -140,6 +144,7 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -150,6 +155,8 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
+ * @param count Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -160,6 +167,7 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -170,6 +178,7 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param filter Ignored.
* @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@@ -181,6 +190,7 @@ public final class UnmodifiableBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java
index 4aee7f433..225d64aad 100644
--- a/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java
+++ b/src/main/java/org/apache/commons/collections4/bag/UnmodifiableSortedBag.java
@@ -78,6 +78,7 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -88,6 +89,8 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
+ * @param count Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -98,6 +101,7 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -137,6 +141,7 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -147,6 +152,8 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
+ * @param count Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -157,6 +164,7 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -167,6 +175,7 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param filter Ignored.
* @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@@ -178,6 +187,7 @@ public final class UnmodifiableSortedBag<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
index 6cbdbf9de..53483a60f 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/TreeBidiMap.java
@@ -529,6 +529,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -879,6 +880,7 @@ public class TreeBidiMap<K extends Comparable<K>, V extends Comparable<V>>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
index e85ddc4df..b4c5ca35d 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
@@ -114,6 +114,8 @@ public final class UnmodifiableBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param key Ignored.
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -124,6 +126,7 @@ public final class UnmodifiableBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param mapToCopy Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -134,6 +137,7 @@ public final class UnmodifiableBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param key Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -144,6 +148,7 @@ public final class UnmodifiableBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
index 5abb80afc..634922e7a 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
@@ -124,6 +124,8 @@ public final class UnmodifiableOrderedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param key Ignored.
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -134,6 +136,7 @@ public final class UnmodifiableOrderedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param mapToCopy Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -144,6 +147,7 @@ public final class UnmodifiableOrderedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param key Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -154,6 +158,7 @@ public final class UnmodifiableOrderedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
index 151804184..9f05ef794 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
@@ -122,6 +122,8 @@ public final class UnmodifiableSortedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param key Ignored.
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -132,6 +134,7 @@ public final class UnmodifiableSortedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param mapToCopy Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -142,6 +145,7 @@ public final class UnmodifiableSortedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param key Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -152,6 +156,7 @@ public final class UnmodifiableSortedBidiMap<K, V>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param value Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
index 716568895..ed1eb4ee4 100644
--- a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
@@ -119,6 +119,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -129,6 +130,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -169,6 +171,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -179,6 +182,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -189,6 +193,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param filter Ignored.
* @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@@ -200,6 +205,7 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
index 9ceb17f54..da9162324 100644
--- a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
@@ -77,6 +77,7 @@ public final class UnmodifiableCollection<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -112,6 +113,7 @@ public final class UnmodifiableCollection<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param object Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -122,6 +124,7 @@ public final class UnmodifiableCollection<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
@@ -132,6 +135,7 @@ public final class UnmodifiableCollection<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param filter Ignored.
* @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@@ -143,6 +147,7 @@ public final class UnmodifiableCollection<E>
/**
* Always throws {@link UnsupportedOperationException}.
*
+ * @param coll Ignored.
* @throws UnsupportedOperationException Always thrown.
*/
@Override
diff --git a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
index 4ca8503d5..585d66133 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableListIterator.java
@@ -76,6 +76,12 @@ public final class UnmodifiableListIterator<E> implements ListIterator<E>, Unmod
this.iterator = iterator;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param obj Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void add(final E obj) {
throw new UnsupportedOperationException("add() is not supported");
@@ -111,11 +117,22 @@ public final class UnmodifiableListIterator<E> implements ListIterator<E>, Unmod
return iterator.previousIndex();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException("remove() is not supported");
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param ignored Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void set(final E ignored) {
throw new UnsupportedOperationException("set() is not supported");
(commons-collections) 33/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 22b084710e0413249150202064e1f5ca552dc1bd
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:28:15 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/map/UnmodifiableOrderedMap.java | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
index d3438ea67..8e6f34ce0 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
@@ -80,6 +80,11 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
super((OrderedMap<K, V>) map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -103,11 +108,24 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
return UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param mapToCopy Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void putAll(final Map<? extends K, ? extends V> mapToCopy) {
throw new UnsupportedOperationException();
@@ -127,6 +145,12 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
map = (Map<K, V>) in.readObject(); // (1)
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
(commons-collections) 08/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit bece60af19b57a842eef99db48d96066c6326c31
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:00:57 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/iterators/CartesianProductIterator.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java b/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java
index 565dc2828..b3f2d105b 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java
@@ -149,6 +149,11 @@ public class CartesianProductIterator<E> implements Iterator<List<E>> {
throw new IllegalStateException("reached unreachable code");
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException("remove");
(commons-collections) 13/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit b34feb65a213cd15498b8d5097f04f6b1efb8487
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:04:46 2026 -0400
Add missing Javadoc and tags.
---
.../apache/commons/collections4/iterators/PermutationIterator.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
index 6aace6657..9aa4e4660 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PermutationIterator.java
@@ -152,6 +152,11 @@ public class PermutationIterator<E> implements Iterator<List<E>> {
return result;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException("remove() is not supported");
(commons-collections) 03/49: Inline single-use local variable.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 4fc131d11d8cddac06403442d5475bce53952fa3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 18:58:11 2026 -0400
Inline single-use local variable.
---
.../commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
index 3ddc56b25..5abb80afc 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
@@ -163,8 +163,7 @@ public final class UnmodifiableOrderedBidiMap<K, V>
@Override
public Set<V> values() {
- final Set<V> set = super.values();
- return UnmodifiableSet.unmodifiableSet(set);
+ return UnmodifiableSet.unmodifiableSet(super.values());
}
}
(commons-collections) 45/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 4566cdaa4c25e84f568ddf685fdd95b0d4446f3a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:40:30 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/set/UnmodifiableSortedSet.java | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java
index 57fe29e8d..237de8619 100644
--- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java
+++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java
@@ -72,16 +72,33 @@ public final class UnmodifiableSortedSet<E>
super(set);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -111,17 +128,33 @@ public final class UnmodifiableSortedSet<E>
setCollection((Collection<E>) in.readObject()); // (1)
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -129,6 +162,11 @@ public final class UnmodifiableSortedSet<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 43/49: Inline single-use local variables.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 79e771c7d4fa2b9560c0c4f1520ba5d25bf01f06
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:38:07 2026 -0400
Inline single-use local variables.
---
.../collections4/set/UnmodifiableNavigableSet.java | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java
index 044229927..f9969bb7c 100644
--- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java
+++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java
@@ -114,14 +114,12 @@ public final class UnmodifiableNavigableSet<E>
@Override
public SortedSet<E> headSet(final E toElement) {
- final SortedSet<E> head = decorated().headSet(toElement);
- return UnmodifiableSortedSet.unmodifiableSortedSet(head);
+ return UnmodifiableSortedSet.unmodifiableSortedSet(decorated().headSet(toElement));
}
@Override
public NavigableSet<E> headSet(final E toElement, final boolean inclusive) {
- final NavigableSet<E> head = decorated().headSet(toElement, inclusive);
- return unmodifiableNavigableSet(head);
+ return unmodifiableNavigableSet(decorated().headSet(toElement, inclusive));
}
@Override
@@ -212,27 +210,23 @@ public final class UnmodifiableNavigableSet<E>
@Override
public NavigableSet<E> subSet(final E fromElement, final boolean fromInclusive, final E toElement,
final boolean toInclusive) {
- final NavigableSet<E> sub = decorated().subSet(fromElement, fromInclusive, toElement, toInclusive);
- return unmodifiableNavigableSet(sub);
+ return unmodifiableNavigableSet(decorated().subSet(fromElement, fromInclusive, toElement, toInclusive));
}
// SortedSet
@Override
public SortedSet<E> subSet(final E fromElement, final E toElement) {
- final SortedSet<E> sub = decorated().subSet(fromElement, toElement);
- return UnmodifiableSortedSet.unmodifiableSortedSet(sub);
+ return UnmodifiableSortedSet.unmodifiableSortedSet(decorated().subSet(fromElement, toElement));
}
@Override
public SortedSet<E> tailSet(final E fromElement) {
- final SortedSet<E> tail = decorated().tailSet(fromElement);
- return UnmodifiableSortedSet.unmodifiableSortedSet(tail);
+ return UnmodifiableSortedSet.unmodifiableSortedSet(decorated().tailSet(fromElement));
}
@Override
public NavigableSet<E> tailSet(final E fromElement, final boolean inclusive) {
- final NavigableSet<E> tail = decorated().tailSet(fromElement, inclusive);
- return unmodifiableNavigableSet(tail);
+ return unmodifiableNavigableSet(decorated().tailSet(fromElement, inclusive));
}
/**
(commons-collections) 35/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit ce58b94fd0d17a196565c6c1836ae133a8ca843e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:29:35 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/map/UnmodifiableSortedMap.java | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
index b2b6591c1..6319ba3a8 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java
@@ -80,6 +80,11 @@ public final class UnmodifiableSortedMap<K, V>
super((SortedMap<K, V>) map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -115,11 +120,24 @@ public final class UnmodifiableSortedMap<K, V>
return decorated().lastKey();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param mapToCopy Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void putAll(final Map<? extends K, ? extends V> mapToCopy) {
throw new UnsupportedOperationException();
@@ -139,6 +157,12 @@ public final class UnmodifiableSortedMap<K, V>
map = (Map<K, V>) in.readObject();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
(commons-collections) 36/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 0dcf60c39941482f15efb23aceb1f8c23e7bd635
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:30:01 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/multimap/AbstractMultiValuedMap.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
index fe7b3e770..f6e707c7e 100644
--- a/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
+++ b/src/main/java/org/apache/commons/collections4/multimap/AbstractMultiValuedMap.java
@@ -285,6 +285,12 @@ public abstract class AbstractMultiValuedMap<K, V> implements MultiValuedMap<K,
super(key, value);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V setValue(final V value) {
throw new UnsupportedOperationException();
(commons-collections) 23/49: Inline single-use local variable.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 3aa611c16af125d364b0f2fbb96a7fbe2337297e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:19:40 2026 -0400
Inline single-use local variable.
---
.../java/org/apache/commons/collections4/list/UnmodifiableList.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
index ffb0de7cd..9749df092 100644
--- a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
+++ b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
@@ -215,8 +215,7 @@ public final class UnmodifiableList<E>
@Override
public List<E> subList(final int fromIndex, final int toIndex) {
- final List<E> sub = decorated().subList(fromIndex, toIndex);
- return new UnmodifiableList<>(sub);
+ return new UnmodifiableList<>(decorated().subList(fromIndex, toIndex));
}
}
(commons-collections) 22/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 4bcf30fc459169836a527f76af66440b7c362ab6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:19:31 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/list/UnmodifiableList.java | 66 ++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
index da9175410..ffb0de7cd 100644
--- a/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
+++ b/src/main/java/org/apache/commons/collections4/list/UnmodifiableList.java
@@ -74,26 +74,57 @@ public final class UnmodifiableList<E>
super((List<E>) list);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param index Ignored.
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void add(final int index, final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param index Ignored.
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final int index, final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -114,22 +145,44 @@ public final class UnmodifiableList<E>
return UnmodifiableListIterator.unmodifiableListIterator(decorated().listIterator(index));
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param index Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public E remove(final int index) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -137,11 +190,24 @@ public final class UnmodifiableList<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param index Ignored.
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public E set(final int index, final E object) {
throw new UnsupportedOperationException();
(commons-collections) 06/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 19785746c34a147b4f8afe0676644bf42f65c6b7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:00:01 2026 -0400
Add missing Javadoc and tags.
---
.../collection/UnmodifiableCollection.java | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
index 91ae4cd4a..9ceb17f54 100644
--- a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableCollection.java
@@ -74,16 +74,31 @@ public final class UnmodifiableCollection<E>
super((Collection<E>) coll);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -94,17 +109,30 @@ public final class UnmodifiableCollection<E>
return UnmodifiableIterator.unmodifiableIterator(decorated().iterator());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -112,6 +140,11 @@ public final class UnmodifiableCollection<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 04/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit eb43fa67a974dd87b5796d9385ccd95c49518ceb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 18:58:46 2026 -0400
Add missing Javadoc and tags.
---
.../bidimap/UnmodifiableSortedBidiMap.java | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
index 7cb375a8b..151804184 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMap.java
@@ -76,6 +76,11 @@ public final class UnmodifiableSortedBidiMap<K, V>
super((SortedBidiMap<K, V>) map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -114,21 +119,41 @@ public final class UnmodifiableSortedBidiMap<K, V>
return UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void putAll(final Map<? extends K, ? extends V> mapToCopy) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public K removeValue(final Object value) {
throw new UnsupportedOperationException();
(commons-collections) 02/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit b6d5d78eb95efc938785775e6d7aa58a7801a0d2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 18:58:02 2026 -0400
Add missing Javadoc and tags.
---
.../bidimap/UnmodifiableOrderedBidiMap.java | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
index f45ac69fe..3ddc56b25 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
@@ -75,6 +75,11 @@ public final class UnmodifiableOrderedBidiMap<K, V>
super((OrderedBidiMap<K, V>) map);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -116,21 +121,41 @@ public final class UnmodifiableOrderedBidiMap<K, V>
return UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V put(final K key, final V value) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void putAll(final Map<? extends K, ? extends V> mapToCopy) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V remove(final Object key) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public K removeValue(final Object value) {
throw new UnsupportedOperationException();
(commons-collections) 30/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 9274f7d22840d3e732ba5a61a39de27546bccdf6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:24:55 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/map/UnmodifiableEntrySet.java | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
index 52217c80b..ba2a3f711 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java
@@ -50,6 +50,12 @@ public final class UnmodifiableEntrySet<K, V>
super(entry);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param value Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public V setValue(final V value) {
throw new UnsupportedOperationException();
@@ -65,11 +71,21 @@ public final class UnmodifiableEntrySet<K, V>
super(iterator);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public Map.Entry<K, V> next() {
return new UnmodifiableEntry(getIterator().next());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException();
@@ -106,16 +122,33 @@ public final class UnmodifiableEntrySet<K, V>
super(set);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final Map.Entry<K, V> object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends Map.Entry<K, V>> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -126,17 +159,33 @@ public final class UnmodifiableEntrySet<K, V>
return new UnmodifiableEntrySetIterator(decorated().iterator());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -144,6 +193,12 @@ public final class UnmodifiableEntrySet<K, V>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 39/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit db49091f43e363df492183ddccacf0396e477c51
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:33:16 2026 -0400
Add missing Javadoc and tags.
---
.../multiset/UnmodifiableMultiSet.java | 60 ++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
index 35c0c6546..1b04aefc9 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/UnmodifiableMultiSet.java
@@ -75,21 +75,45 @@ public final class UnmodifiableMultiSet<E>
super((MultiSet<E>) multiset);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @param count Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public int add(final E object, final int count) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -120,22 +144,45 @@ public final class UnmodifiableMultiSet<E>
setCollection((Collection<E>) in.readObject());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @param count Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public int remove(final Object object, final int count) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -143,11 +190,24 @@ public final class UnmodifiableMultiSet<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @param count Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public int setCount(final E object, final int count) {
throw new UnsupportedOperationException();
(commons-collections) 44/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 14250d644d92f456989136f13d3aa52e6dc52d90
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:39:08 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/set/UnmodifiableSet.java | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSet.java
index d79a34235..4f8130f87 100644
--- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSet.java
+++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSet.java
@@ -72,16 +72,33 @@ public final class UnmodifiableSet<E>
super((Set<E>) set);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -92,17 +109,33 @@ public final class UnmodifiableSet<E>
return UnmodifiableIterator.unmodifiableIterator(decorated().iterator());
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -110,6 +143,12 @@ public final class UnmodifiableSet<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 09/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit a550fb3e0924a852acb451aa93b73502a22f4403
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:03:04 2026 -0400
Better Javadoc
---
.../collections4/iterators/FilterListIterator.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
index 4ec417ae5..846731b5c 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
@@ -108,9 +108,10 @@ public class FilterListIterator<E> implements ListIterator<E> {
}
/**
- * Not supported.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @param o the element to insert
+ * @param o ignored.
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void add(final E o) {
@@ -187,20 +188,24 @@ public class FilterListIterator<E> implements ListIterator<E> {
return nextIndex - 1;
}
- /** Not supported. */
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException("FilterListIterator.remove() is not supported.");
}
/**
- * Not supported.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @param ignored the element with which to replace the last element returned by
- * {@code next} or {@code previous}
+ * @param e ignored.
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
- public void set(final E ignored) {
+ public void set(final E e) {
throw new UnsupportedOperationException("FilterListIterator.set(Object) is not supported.");
}
(commons-collections) 38/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 6a0a90f58acac6de39feed806f266737b5bc9847
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:31:43 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/multiset/AbstractMultiSet.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java
index 2d24a9b91..a340117c0 100644
--- a/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java
+++ b/src/main/java/org/apache/commons/collections4/multiset/AbstractMultiSet.java
@@ -258,6 +258,13 @@ public abstract class AbstractMultiSet<E> extends AbstractCollection<E> implemen
return true;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @param occurrences Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public int add(final E object, final int occurrences) {
throw new UnsupportedOperationException();
@@ -428,6 +435,13 @@ public abstract class AbstractMultiSet<E> extends AbstractCollection<E> implemen
return remove(object, 1) != 0;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @param occurrences Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public int remove(final Object object, final int occurrences) {
throw new UnsupportedOperationException();
(commons-collections) 14/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit f5e158b7c5590e8112b675ace2cbc042af900e1a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:04:57 2026 -0400
Better Javadoc
---
.../org/apache/commons/collections4/iterators/PushbackIterator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java b/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
index 41825e61c..58ea3f655 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/PushbackIterator.java
@@ -96,9 +96,9 @@ public class PushbackIterator<E> implements Iterator<E> {
}
/**
- * This iterator will always throw an {@link UnsupportedOperationException}.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @throws UnsupportedOperationException always
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void remove() {
(commons-collections) 01/49: Inline single-use local variable.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit be7f08a4bf90a83d303942f7fb572ce9e4f9ec4c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 18:57:36 2026 -0400
Inline single-use local variable.
---
.../org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
index 9fef095fd..e85ddc4df 100644
--- a/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMap.java
@@ -153,8 +153,7 @@ public final class UnmodifiableBidiMap<K, V>
@Override
public Set<V> values() {
- final Set<V> set = super.values();
- return UnmodifiableSet.unmodifiableSet(set);
+ return UnmodifiableSet.unmodifiableSet(super.values());
}
}
(commons-collections) 11/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit acc63f4675b03a531fddb7e51a26c4f99916cc1a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:03:41 2026 -0400
Better Javadoc
---
.../apache/commons/collections4/iterators/ObjectArrayIterator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java
index 76734cd50..eccb12ebe 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ObjectArrayIterator.java
@@ -155,9 +155,9 @@ public class ObjectArrayIterator<E> implements ResettableIterator<E> {
}
/**
- * Throws {@link UnsupportedOperationException}.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @throws UnsupportedOperationException always
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void remove() {
(commons-collections) 07/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 44ad5537f5b25ede073020a47b9977ea692477ea
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:00:43 2026 -0400
Better Javadoc
---
.../java/org/apache/commons/collections4/iterators/ArrayIterator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
index 1ece7fd4d..b2b0e596c 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
@@ -175,9 +175,9 @@ public class ArrayIterator<E> implements ResettableIterator<E> {
}
/**
- * Throws {@link UnsupportedOperationException}.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @throws UnsupportedOperationException always
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void remove() {
(commons-collections) 29/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 3bde84b73342b4546526ee904923bd6bb27bddfe
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:23:15 2026 -0400
Add missing Javadoc and tags.
---
.../commons/collections4/map/SingletonMap.java | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
index cf3383e92..af383c548 100644
--- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
@@ -121,6 +121,11 @@ public class SingletonMap<K, V>
return parent.getKey();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void remove() {
throw new UnsupportedOperationException();
@@ -162,6 +167,11 @@ public class SingletonMap<K, V>
this.parent = parent;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -248,7 +258,9 @@ public class SingletonMap<K, V>
}
/**
- * Unsupported operation.
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void clear() {
@@ -533,11 +545,10 @@ public class SingletonMap<K, V>
}
/**
- * Unsupported operation.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @param key the mapping to remove
- * @return the value mapped to the removed key, null if key not in map
- * @throws UnsupportedOperationException always
+ * @param key Ignored.
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public V remove(final Object key) {
(commons-collections) 34/49: Inline single-use local variables.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit e6398e58884e76ad64af0a1b3ffe7d0c24dbec31
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:28:44 2026 -0400
Inline single-use local variables.
---
.../apache/commons/collections4/map/UnmodifiableOrderedMap.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
index 8e6f34ce0..6b1f32c51 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java
@@ -92,14 +92,12 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
@Override
public Set<Map.Entry<K, V>> entrySet() {
- final Set<Map.Entry<K, V>> set = super.entrySet();
- return UnmodifiableEntrySet.unmodifiableEntrySet(set);
+ return UnmodifiableEntrySet.unmodifiableEntrySet(super.entrySet());
}
@Override
public Set<K> keySet() {
- final Set<K> set = super.keySet();
- return UnmodifiableSet.unmodifiableSet(set);
+ return UnmodifiableSet.unmodifiableSet(super.keySet());
}
@Override
@@ -158,8 +156,7 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
@Override
public Collection<V> values() {
- final Collection<V> coll = super.values();
- return UnmodifiableCollection.unmodifiableCollection(coll);
+ return UnmodifiableCollection.unmodifiableCollection(super.values());
}
/**
(commons-collections) 05/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 6dab3336fa38d04d789f8cf41858fd6815780b0b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 18:59:29 2026 -0400
Add missing Javadoc and tags.
---
.../collection/UnmodifiableBoundedCollection.java | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
index aef53d754..716568895 100644
--- a/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollection.java
@@ -116,16 +116,31 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
super((BoundedCollection<E>) coll);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -151,17 +166,30 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
return decorated().maxSize();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -169,6 +197,11 @@ public final class UnmodifiableBoundedCollection<E> extends AbstractCollectionDe
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 15/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit af6d2953620c20908026f628d95f0c4b379ff54c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:05:23 2026 -0400
Better Javadoc
---
.../commons/collections4/iterators/SingletonListIterator.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
index f7396ac34..753638d0a 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
@@ -44,10 +44,10 @@ public class SingletonListIterator<E> implements ResettableListIterator<E> {
}
/**
- * Add always throws {@link UnsupportedOperationException}.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @param obj the object to add
- * @throws UnsupportedOperationException always
+ * @param obj Ignored.
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void add(final E obj) {
(commons-collections) 42/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit c4b50063a53c8c141801983c25d9201aa0461f23
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:37:28 2026 -0400
Add missing Javadoc and tags.
---
.../collections4/set/UnmodifiableNavigableSet.java | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java
index eeb617e6a..044229927 100644
--- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java
+++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableNavigableSet.java
@@ -69,16 +69,33 @@ public final class UnmodifiableNavigableSet<E>
super(set);
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean add(final E object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean addAll(final Collection<? extends E> coll) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -113,6 +130,9 @@ public final class UnmodifiableNavigableSet<E>
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.5.0-M1
*/
@Override
@@ -121,6 +141,9 @@ public final class UnmodifiableNavigableSet<E>
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.5.0-M1
*/
@Override
@@ -141,17 +164,33 @@ public final class UnmodifiableNavigableSet<E>
setCollection((Collection<E>) in.readObject()); // (1)
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param object Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object object) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -159,6 +198,12 @@ public final class UnmodifiableNavigableSet<E>
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 28/49: Add missing Javadoc and tags.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 541f38a30dcf16c2f209333a3a61253219e51937
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:22:14 2026 -0400
Add missing Javadoc and tags.
---
.../apache/commons/collections4/map/LinkedMap.java | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/src/main/java/org/apache/commons/collections4/map/LinkedMap.java b/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
index d4be42f25..5b247bbd3 100644
--- a/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/LinkedMap.java
@@ -81,6 +81,11 @@ public class LinkedMap<K, V> extends AbstractLinkedMap<K, V> implements Serializ
this.parent = parent;
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public void clear() {
throw new UnsupportedOperationException();
@@ -126,22 +131,44 @@ public class LinkedMap<K, V> extends AbstractLinkedMap<K, V> implements Serializ
return UnmodifiableListIterator.unmodifiableListIterator(super.listIterator(fromIndex));
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param index Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public K remove(final int index) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param obj Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean remove(final Object obj) {
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean removeAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
}
/**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param filter Ignored.
+ * @throws UnsupportedOperationException Always thrown.
* @since 4.4
*/
@Override
@@ -149,6 +176,12 @@ public class LinkedMap<K, V> extends AbstractLinkedMap<K, V> implements Serializ
throw new UnsupportedOperationException();
}
+ /**
+ * Always throws {@link UnsupportedOperationException}.
+ *
+ * @param coll Ignored.
+ * @throws UnsupportedOperationException Always thrown.
+ */
@Override
public boolean retainAll(final Collection<?> coll) {
throw new UnsupportedOperationException();
(commons-collections) 46/49: Inline single-use local variables.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 875aa03739b76b127f409d5328b837bd1d7bd6b7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:40:53 2026 -0400
Inline single-use local variables.
---
.../apache/commons/collections4/set/UnmodifiableSortedSet.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java
index 237de8619..37a313e16 100644
--- a/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java
+++ b/src/main/java/org/apache/commons/collections4/set/UnmodifiableSortedSet.java
@@ -106,8 +106,7 @@ public final class UnmodifiableSortedSet<E>
@Override
public SortedSet<E> headSet(final E toElement) {
- final SortedSet<E> head = decorated().headSet(toElement);
- return unmodifiableSortedSet(head);
+ return unmodifiableSortedSet(decorated().headSet(toElement));
}
@Override
@@ -174,14 +173,12 @@ public final class UnmodifiableSortedSet<E>
@Override
public SortedSet<E> subSet(final E fromElement, final E toElement) {
- final SortedSet<E> sub = decorated().subSet(fromElement, toElement);
- return unmodifiableSortedSet(sub);
+ return unmodifiableSortedSet(decorated().subSet(fromElement, toElement));
}
@Override
public SortedSet<E> tailSet(final E fromElement) {
- final SortedSet<E> tail = decorated().tailSet(fromElement);
- return unmodifiableSortedSet(tail);
+ return unmodifiableSortedSet(decorated().tailSet(fromElement));
}
/**
(commons-collections) 32/49: Inline single-use local variable.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit cd4ded3913ad6be01a31d0a575505cfa3511467b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:26:25 2026 -0400
Inline single-use local variable.
---
.../java/org/apache/commons/collections4/map/UnmodifiableMap.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
index c522ca38c..227414ad9 100644
--- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java
@@ -94,8 +94,7 @@ public final class UnmodifiableMap<K, V>
@Override
public Set<Map.Entry<K, V>> entrySet() {
- final Set<Map.Entry<K, V>> set = super.entrySet();
- return UnmodifiableEntrySet.unmodifiableEntrySet(set);
+ return UnmodifiableEntrySet.unmodifiableEntrySet(super.entrySet());
}
@Override
@@ -164,8 +163,7 @@ public final class UnmodifiableMap<K, V>
@Override
public Collection<V> values() {
- final Collection<V> coll = super.values();
- return UnmodifiableCollection.unmodifiableCollection(coll);
+ return UnmodifiableCollection.unmodifiableCollection(super.values());
}
/**
(commons-collections) 10/49: Better Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 2ff93fb8c69cade981ae981ac4d3ab2ae80274d3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 9 19:03:24 2026 -0400
Better Javadoc
---
.../org/apache/commons/collections4/iterators/NodeListIterator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
index 916eeab92..5b9a23e69 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
@@ -78,9 +78,9 @@ public class NodeListIterator implements Iterator<Node> {
}
/**
- * Throws {@link UnsupportedOperationException}.
+ * Always throws {@link UnsupportedOperationException}.
*
- * @throws UnsupportedOperationException always
+ * @throws UnsupportedOperationException Always thrown.
*/
@Override
public void remove() {