From 972d29447d115224674154e0150d51bf9ccf6524 Mon Sep 17 00:00:00 2001 From: Allon Mureinik Date: Sun, 5 Mar 2017 11:50:34 +0200 Subject: [PATCH 1/4] Add @param for in ArrayUtils#insert --- src/main/java/org/apache/commons/lang3/ArrayUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java index b09e8918942..4ced70c2b4f 100644 --- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java +++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java @@ -8408,12 +8408,13 @@ public static short[] insert(final int index, final short[] array, final short.. * ArrayUtils.insert(index, array, null) = cloned copy of 'array' * ArrayUtils.insert(index, null, values) = null * - * + * + * @param The type of elements in {@code array} and {@code values} * @param index the position within {@code array} to insert the new values * @param array the array to insert the values into, may be {@code null} * @param values the new values to insert, may be {@code null} * @return The new array. - * @throws IndexOutOfBoundsException if {@code array} is provided + * @throws IndexOutOfBoundsException if {@code array} is provided * and either {@code index < 0} or {@code index > array.length} * @since 3.6 */ From e4147a700f6c49b954a6f91dc8f2f1499777e92c Mon Sep 17 00:00:00 2001 From: Allon Mureinik Date: Sun, 5 Mar 2017 11:53:33 +0200 Subject: [PATCH 2/4] Fix StirngUtils

tags in javadoc The paragraph

Whitespace is defined by {@link Character#isWhitespace(char)}.

appears in several places in the javadoc (presumably, copy-pasted from the original one to the others). This is obviously a mistake, as a paragraph should start with

, not with

. This patch fixes all the occurrences of this paragraph to the proper form:

Whitespace is defined by {@link Character#isWhitespace(char)}.

--- .../org/apache/commons/lang3/StringUtils.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 804985097f3..a92c4dfd7e6 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -313,7 +313,7 @@ public static boolean isNoneEmpty(final CharSequence... css) { /** *

Checks if a CharSequence is empty (""), null or whitespace only.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *
      * StringUtils.isBlank(null)      = true
@@ -344,7 +344,7 @@ public static boolean isBlank(final CharSequence cs) {
     /**
      * 

Checks if a CharSequence is not empty (""), not null and not whitespace only.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *
      * StringUtils.isNotBlank(null)      = false
@@ -367,7 +367,7 @@ public static boolean isNotBlank(final CharSequence cs) {
     /**
      * 

Checks if any of the CharSequences are empty ("") or null or whitespace only.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *
      * StringUtils.isAnyBlank(null)             = true
@@ -400,7 +400,7 @@ public static boolean isAnyBlank(final CharSequence... css) {
     /**
      * 

Checks if any of the CharSequences are not empty (""), not null and not whitespace only.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *
      * StringUtils.isAnyNotBlank(null)             = false
@@ -433,7 +433,7 @@ public static boolean isAnyNotBlank(final CharSequence... css) {
     /**
      * 

Checks if none of the CharSequences are empty (""), null or whitespace only.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *
      * StringUtils.isNoneBlank(null)             = false
@@ -1943,7 +1943,7 @@ public static boolean containsIgnoreCase(final CharSequence str, final CharSeque
     /**
      * 

Check whether the given CharSequence contains any whitespace characters.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* * @param seq the CharSequence to check (may be {@code null}) * @return {@code true} if the CharSequence is not empty and @@ -7089,7 +7089,7 @@ public static boolean isNumericSpace(final CharSequence cs) { /** *

Checks if the CharSequence contains only whitespace.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *

{@code null} will return {@code false}. * An empty CharSequence (length()=0) will return {@code true}.

@@ -7238,7 +7238,7 @@ public static String defaultString(final String str, final String defaultStr) { *

Returns either the passed in CharSequence, or if the CharSequence is * whitespace, empty ("") or {@code null}, the value of {@code defaultStr}.

* - *

Whitespace is defined by {@link Character#isWhitespace(char)}.

+ *

Whitespace is defined by {@link Character#isWhitespace(char)}.

* *
      * StringUtils.defaultIfBlank(null, "NULL")  = "NULL"

From 54eff5e8a55f591c1ae3fe31fd04dce663bbe4e1 Mon Sep 17 00:00:00 2001
From: Allon Mureinik 
Date: Sun, 5 Mar 2017 11:56:05 +0200
Subject: [PATCH 3/4] Remove 

tag from Computable's javadoc The standard javadoc doclet does not allow self closing tags (such as

). This patch removes such a tag from Computable's javadoc, as it's redundant anyway, as it's only used to create spaces between two existing paragraphs. --- .../java/org/apache/commons/lang3/concurrent/Computable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/lang3/concurrent/Computable.java b/src/main/java/org/apache/commons/lang3/concurrent/Computable.java index d9e5468d411..6cb37aaf98f 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/Computable.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/Computable.java @@ -18,7 +18,7 @@ /** *

Definition of an interface for a wrapper around a calculation that takes a single parameter and returns a result.

- *

+ * *

This interface allows for wrapping a calculation into a class so that it maybe passed around an application.

* * @param the type of the input to the calculation From ac5584040440fc426dea4bf046ccd80973066df8 Mon Sep 17 00:00:00 2001 From: Allon Mureinik Date: Sun, 5 Mar 2017 18:03:01 +0200 Subject: [PATCH 4/4] Add javadoc creation to Travis CI --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index a969abafb33..4e3fd53563a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,5 +21,8 @@ jdk: - oraclejdk7 - oraclejdk8 +script: + - mvn test javadoc:javadoc -B + after_success: - mvn clean apache-rat:check cobertura:cobertura coveralls:report