From 06ce80f114e19d66a403cd505d1974ca648ff325 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 31 Oct 2023 07:00:47 -0400 Subject: [PATCH] Normalize setter Javadoc --- src/main/java/org/apache/commons/collections4/MapUtils.java | 4 ++-- src/main/java/org/apache/commons/collections4/SetUtils.java | 2 +- .../apache/commons/collections4/iterators/FilterIterator.java | 2 +- .../commons/collections4/iterators/SingletonListIterator.java | 2 +- .../collections4/collection/AbstractCollectionTest.java | 4 ++-- .../commons/collections4/iterators/FilterIteratorTest.java | 2 +- .../org/apache/commons/collections4/set/AbstractSetTest.java | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/MapUtils.java b/src/main/java/org/apache/commons/collections4/MapUtils.java index abfb518a8a..c3ad90b950 100644 --- a/src/main/java/org/apache/commons/collections4/MapUtils.java +++ b/src/main/java/org/apache/commons/collections4/MapUtils.java @@ -1737,7 +1737,7 @@ public static int size(final Map map) { * *
      * Map m = MapUtils.synchronizedMap(myMap);
-     * Set s = m.keySet(); // outside synchronized block
+     * Sets s = m.keySet(); // outside synchronized block
      * synchronized (m) { // synchronized on MAP!
      *     Iterator i = s.iterator();
      *     while (i.hasNext()) {
@@ -1767,7 +1767,7 @@ public static  Map synchronizedMap(final Map map) {
      *
      * 
      * Map m = MapUtils.synchronizedSortedMap(myMap);
-     * Set s = m.keySet(); // outside synchronized block
+     * Sets s = m.keySet(); // outside synchronized block
      * synchronized (m) { // synchronized on MAP!
      *     Iterator i = s.iterator();
      *     while (i.hasNext()) {
diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java
index 70b81461bb..6d7bcd6221 100644
--- a/src/main/java/org/apache/commons/collections4/SetUtils.java
+++ b/src/main/java/org/apache/commons/collections4/SetUtils.java
@@ -435,7 +435,7 @@ public static  SortedSet predicatedSortedSet(final SortedSet set,
      * avoid non-deterministic behavior:
      *
      * 
-     * Set s = SetUtils.synchronizedSet(mySet);
+     * Sets s = SetUtils.synchronizedSet(mySet);
      * synchronized (s) {
      *     Iterator i = s.iterator();
      *     while (i.hasNext()) {
diff --git a/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java b/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java
index 7f86848c2d..f388a653c9 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/FilterIterator.java
@@ -160,7 +160,7 @@ public void setPredicate(final Predicate predicate) {
     }
 
     /**
-     * Set nextObject to the next object. If there are no more
+     * Sets nextObject to the next object. If there are no more
      * objects, then return false. Otherwise, return true.
      */
     private boolean setNextObject() {
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 77cba9423c..a7cf71b977 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/SingletonListIterator.java
@@ -155,7 +155,7 @@ public void add(final E obj) {
     }
 
     /**
-     * Set sets the value of the singleton.
+     * Sets sets the value of the singleton.
      *
      * @param obj  the object to set
      * @throws IllegalStateException if {@code next} has not been called
diff --git a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
index 9e9ce2adc2..1191c32262 100644
--- a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
@@ -1356,7 +1356,7 @@ public Collection getCollection() {
     }
 
     /**
-     * Set the collection.
+     * Sets the collection.
      * @param collection the Collection to set
      */
     public void setCollection(final Collection collection) {
@@ -1368,7 +1368,7 @@ public Collection getConfirmed() {
     }
 
     /**
-     * Set the confirmed.
+     * Sets the confirmed.
      * @param confirmed the Collection to set
      */
     public void setConfirmed(final Collection confirmed) {
diff --git a/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java
index 4d81b6b8e6..5b3be36d78 100644
--- a/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java
+++ b/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java
@@ -51,7 +51,7 @@ public FilterIteratorTest() {
     private FilterIterator iterator;
 
     /**
-     * Set up instance variables required by this test case.
+     * Sets up instance variables required by this test case.
      */
     @BeforeEach
     public void setUp() {
diff --git a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
index d2d5f49790..3d90c306bd 100644
--- a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
@@ -72,7 +72,7 @@ public void verify() {
     }
 
     /**
-     * Set equals method is defined.
+     * Sets equals method is defined.
      */
     @Override
     public boolean isEqualsCheckable() {