You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/10/21 14:38:55 UTC

(commons-collections) branch master updated (a910ebd82 -> d121ed383)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


    from a910ebd82 Slightly less bad new class name
     new 877f16140 Add missing Javadoc
     new d121ed383 Fail Javadoc on warning

The 2 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:
 pom.xml                                            |  1 +
 .../list/AbstractLinkedListJava21.java             | 43 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)


(commons-collections) 01/02: Add missing Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 877f16140d697d6279755317f9a5ba297ecf21b6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Oct 21 10:38:40 2024 -0400

    Add missing Javadoc
---
 .../list/AbstractLinkedListJava21.java             | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListJava21.java b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListJava21.java
index 77d5e5669..bd7fe91b3 100644
--- a/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListJava21.java
+++ b/src/main/java/org/apache/commons/collections4/list/AbstractLinkedListJava21.java
@@ -39,11 +39,14 @@ import org.apache.commons.collections4.OrderedIterator;
  * Overridable methods are provided to change the storage node and to change how
  * nodes are added to and removed. Hopefully, all you need for unusual subclasses
  * is here.
+ * </p>
  * <p>
  * This is a copy of AbstractLinkedList, modified to be compatible with Java 21
  * (see COLLECTIONS-842 for details).
+ * </p>
  *
  * @param <E> the type of elements in this list
+ * @see AbstractLinkedList
  * @since 4.5.0-M3
  */
 public abstract class AbstractLinkedListJava21<E> implements List<E> {
@@ -235,6 +238,13 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         /** Sublist modCount */
         int expectedModCount;
 
+        /**
+         * Constructs a new instance.
+         *
+         * @param parent The parent AbstractLinkedList.
+         * @param fromIndex An index greater or equal to 0 and less than {@code toIndex}.
+         * @param toIndex An index greater than {@code fromIndex}.
+         */
         protected LinkedSubList(final AbstractLinkedListJava21<E> parent, final int fromIndex, final int toIndex) {
             if (fromIndex < 0) {
                 throw new IndexOutOfBoundsException("fromIndex = " + fromIndex);
@@ -282,6 +292,9 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
             return true;
         }
 
+        /**
+         * Throws a {@link ConcurrentModificationException} if this instance fails its concurrency check.
+         */
         protected void checkModCount() {
             if (parent.modCount != expectedModCount) {
                 throw new ConcurrentModificationException();
@@ -318,6 +331,12 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
             return parent.createSubListListIterator(this, index);
         }
 
+        /**
+         * Throws an {@link IndexOutOfBoundsException} if the given indices are out of bounds.
+         *
+         * @param index lower index.
+         * @param beyond upper index.
+         */
         protected void rangeCheck(final int index, final int beyond) {
             if (index < 0 || index >= beyond) {
                 throw new IndexOutOfBoundsException("Index '" + index + "' out of bounds for size '" + size + "'");
@@ -364,6 +383,12 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         /** The sub list */
         protected final LinkedSubList<E> sub;
 
+        /**
+         * Constructs a new instance.
+         *
+         * @param sub The sub-list.
+         * @param startIndex The starting index.
+         */
         protected LinkedSubListIterator(final LinkedSubList<E> sub, final int startIndex) {
             super(sub.parent, startIndex + sub.offset);
             this.sub = sub;
@@ -566,10 +591,16 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void addFirst(final E o) {
         addNodeAfter(header, o);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void addLast(final E o) {
         addNodeBefore(header, o);
     }
@@ -752,6 +783,9 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         return node.getValue();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public E getFirst() {
         final Node<E> node = header.next;
         if (node == header) {
@@ -760,6 +794,9 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         return node.getValue();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public E getLast() {
         final Node<E> node = header.previous;
         if (node == header) {
@@ -939,6 +976,9 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         modCount++;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public E removeFirst() {
         final Node<E> node = header.next;
         if (node == header) {
@@ -949,6 +989,9 @@ public abstract class AbstractLinkedListJava21<E> implements List<E> {
         return oldValue;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public E removeLast() {
         final Node<E> node = header.previous;
         if (node == header) {


(commons-collections) 02/02: Fail Javadoc on warning

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit d121ed3833e212ec79656da139b9605958b697c3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Oct 21 10:38:49 2024 -0400

    Fail Javadoc on warning
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 3aeacfded..9281f6a28 100644
--- a/pom.xml
+++ b/pom.xml
@@ -224,6 +224,7 @@
         <artifactId>maven-javadoc-plugin</artifactId>
         <configuration>
             <source>8</source>
+            <failOnWarnings>true</failOnWarnings>
             <!-- Enable MathJax -->
             <additionalOptions>-Xdoclint:all --allow-script-in-comments -header '&lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/${math.mathjax.version}/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</additionalOptions>
         </configuration>