From 0cfc31b98778767cb2f8db93bc2f488abe058e2e Mon Sep 17 00:00:00 2001 From: aherbert Date: Fri, 5 Mar 2021 11:46:15 +0000 Subject: [PATCH] Fix formatting --- .../org/apache/commons/lang3/Streams.java | 12 +- .../org/apache/commons/lang3/StringUtils.java | 52 ++--- .../org/apache/commons/lang3/Validate.java | 216 +++++++++--------- .../commons/lang3/math/NumberUtils.java | 4 +- 4 files changed, 142 insertions(+), 142 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/Streams.java b/src/main/java/org/apache/commons/lang3/Streams.java index 258b9a268..8e2755848 100644 --- a/src/main/java/org/apache/commons/lang3/Streams.java +++ b/src/main/java/org/apache/commons/lang3/Streams.java @@ -67,12 +67,12 @@ import org.apache.commons.lang3.Functions.FailablePredicate; @Deprecated public class Streams { - /** - * A reduced, and simplified version of a {@link Stream} with - * failable method signatures. - * @param The streams element type. - * @deprecated Use {@link org.apache.commons.lang3.stream.Streams.FailableStream}. - */ + /** + * A reduced, and simplified version of a {@link Stream} with + * failable method signatures. + * @param The streams element type. + * @deprecated Use {@link org.apache.commons.lang3.stream.Streams.FailableStream}. + */ @Deprecated public static class FailableStream { diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 284c20256..056b16745 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -6923,32 +6923,32 @@ public class StringUtils { } /** - *

Case insensitively replaces all occurrences of a String within another String.

- * - *

A {@code null} reference passed to this method is a no-op.

- * - *
-    * StringUtils.replaceIgnoreCase(null, *, *)        = null
-    * StringUtils.replaceIgnoreCase("", *, *)          = ""
-    * StringUtils.replaceIgnoreCase("any", null, *)    = "any"
-    * StringUtils.replaceIgnoreCase("any", *, null)    = "any"
-    * StringUtils.replaceIgnoreCase("any", "", *)      = "any"
-    * StringUtils.replaceIgnoreCase("aba", "a", null)  = "aba"
-    * StringUtils.replaceIgnoreCase("abA", "A", "")    = "b"
-    * StringUtils.replaceIgnoreCase("aba", "A", "z")   = "zbz"
-    * 
- * - * @see #replaceIgnoreCase(String text, String searchString, String replacement, int max) - * @param text text to search and replace in, may be null - * @param searchString the String to search for (case insensitive), may be null - * @param replacement the String to replace it with, may be null - * @return the text with any replacements processed, - * {@code null} if null String input - * @since 3.5 - */ - public static String replaceIgnoreCase(final String text, final String searchString, final String replacement) { - return replaceIgnoreCase(text, searchString, replacement, -1); - } + *

Case insensitively replaces all occurrences of a String within another String.

+ * + *

A {@code null} reference passed to this method is a no-op.

+ * + *
+     * StringUtils.replaceIgnoreCase(null, *, *)        = null
+     * StringUtils.replaceIgnoreCase("", *, *)          = ""
+     * StringUtils.replaceIgnoreCase("any", null, *)    = "any"
+     * StringUtils.replaceIgnoreCase("any", *, null)    = "any"
+     * StringUtils.replaceIgnoreCase("any", "", *)      = "any"
+     * StringUtils.replaceIgnoreCase("aba", "a", null)  = "aba"
+     * StringUtils.replaceIgnoreCase("abA", "A", "")    = "b"
+     * StringUtils.replaceIgnoreCase("aba", "A", "z")   = "zbz"
+     * 
+ * + * @see #replaceIgnoreCase(String text, String searchString, String replacement, int max) + * @param text text to search and replace in, may be null + * @param searchString the String to search for (case insensitive), may be null + * @param replacement the String to replace it with, may be null + * @return the text with any replacements processed, + * {@code null} if null String input + * @since 3.5 + */ + public static String replaceIgnoreCase(final String text, final String searchString, final String replacement) { + return replaceIgnoreCase(text, searchString, replacement, -1); + } /** *

Case insensitively replaces a String with another String inside a larger String, diff --git a/src/main/java/org/apache/commons/lang3/Validate.java b/src/main/java/org/apache/commons/lang3/Validate.java index 6a44d7f72..7dc0d21e1 100644 --- a/src/main/java/org/apache/commons/lang3/Validate.java +++ b/src/main/java/org/apache/commons/lang3/Validate.java @@ -1000,18 +1000,18 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * inclusive values specified; otherwise, throws an exception. - * - *

Validate.inclusiveBetween(0, 2, 1);
- * - * @param start the inclusive start value - * @param end the inclusive end value - * @param value the value to validate - * @throws IllegalArgumentException if the value falls outside the boundaries (inclusive) - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * inclusive values specified; otherwise, throws an exception. + * + *
Validate.inclusiveBetween(0, 2, 1);
+ * + * @param start the inclusive start value + * @param end the inclusive end value + * @param value the value to validate + * @throws IllegalArgumentException if the value falls outside the boundaries (inclusive) + * + * @since 3.3 + */ @SuppressWarnings("boxing") public static void inclusiveBetween(final long start, final long end, final long value) { // TODO when breaking BC, consider returning value @@ -1021,21 +1021,21 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * inclusive values specified; otherwise, throws an exception with the - * specified message. - * - *
Validate.inclusiveBetween(0, 2, 1, "Not in range");
- * - * @param start the inclusive start value - * @param end the inclusive end value - * @param value the value to validate - * @param message the exception message if invalid, not null - * - * @throws IllegalArgumentException if the value falls outside the boundaries - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * inclusive values specified; otherwise, throws an exception with the + * specified message. + * + *
Validate.inclusiveBetween(0, 2, 1, "Not in range");
+ * + * @param start the inclusive start value + * @param end the inclusive end value + * @param value the value to validate + * @param message the exception message if invalid, not null + * + * @throws IllegalArgumentException if the value falls outside the boundaries + * + * @since 3.3 + */ public static void inclusiveBetween(final long start, final long end, final long value, final String message) { // TODO when breaking BC, consider returning value if (value < start || value > end) { @@ -1044,18 +1044,18 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * inclusive values specified; otherwise, throws an exception. - * - *
Validate.inclusiveBetween(0.1, 2.1, 1.1);
- * - * @param start the inclusive start value - * @param end the inclusive end value - * @param value the value to validate - * @throws IllegalArgumentException if the value falls outside the boundaries (inclusive) - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * inclusive values specified; otherwise, throws an exception. + * + *
Validate.inclusiveBetween(0.1, 2.1, 1.1);
+ * + * @param start the inclusive start value + * @param end the inclusive end value + * @param value the value to validate + * @throws IllegalArgumentException if the value falls outside the boundaries (inclusive) + * + * @since 3.3 + */ @SuppressWarnings("boxing") public static void inclusiveBetween(final double start, final double end, final double value) { // TODO when breaking BC, consider returning value @@ -1065,21 +1065,21 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * inclusive values specified; otherwise, throws an exception with the - * specified message. - * - *
Validate.inclusiveBetween(0.1, 2.1, 1.1, "Not in range");
- * - * @param start the inclusive start value - * @param end the inclusive end value - * @param value the value to validate - * @param message the exception message if invalid, not null - * - * @throws IllegalArgumentException if the value falls outside the boundaries - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * inclusive values specified; otherwise, throws an exception with the + * specified message. + * + *
Validate.inclusiveBetween(0.1, 2.1, 1.1, "Not in range");
+ * + * @param start the inclusive start value + * @param end the inclusive end value + * @param value the value to validate + * @param message the exception message if invalid, not null + * + * @throws IllegalArgumentException if the value falls outside the boundaries + * + * @since 3.3 + */ public static void inclusiveBetween(final double start, final double end, final double value, final String message) { // TODO when breaking BC, consider returning value if (value < start || value > end) { @@ -1138,18 +1138,18 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * exclusive values specified; otherwise, throws an exception. - * - *
Validate.exclusiveBetween(0, 2, 1);
- * - * @param start the exclusive start value - * @param end the exclusive end value - * @param value the value to validate - * @throws IllegalArgumentException if the value falls out of the boundaries - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * exclusive values specified; otherwise, throws an exception. + * + *
Validate.exclusiveBetween(0, 2, 1);
+ * + * @param start the exclusive start value + * @param end the exclusive end value + * @param value the value to validate + * @throws IllegalArgumentException if the value falls out of the boundaries + * + * @since 3.3 + */ @SuppressWarnings("boxing") public static void exclusiveBetween(final long start, final long end, final long value) { // TODO when breaking BC, consider returning value @@ -1159,21 +1159,21 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * exclusive values specified; otherwise, throws an exception with the - * specified message. - * - *
Validate.exclusiveBetween(0, 2, 1, "Not in range");
- * - * @param start the exclusive start value - * @param end the exclusive end value - * @param value the value to validate - * @param message the exception message if invalid, not null - * - * @throws IllegalArgumentException if the value falls outside the boundaries - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * exclusive values specified; otherwise, throws an exception with the + * specified message. + * + *
Validate.exclusiveBetween(0, 2, 1, "Not in range");
+ * + * @param start the exclusive start value + * @param end the exclusive end value + * @param value the value to validate + * @param message the exception message if invalid, not null + * + * @throws IllegalArgumentException if the value falls outside the boundaries + * + * @since 3.3 + */ public static void exclusiveBetween(final long start, final long end, final long value, final String message) { // TODO when breaking BC, consider returning value if (value <= start || value >= end) { @@ -1182,18 +1182,18 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * exclusive values specified; otherwise, throws an exception. - * - *
Validate.exclusiveBetween(0.1, 2.1, 1.1);
- * - * @param start the exclusive start value - * @param end the exclusive end value - * @param value the value to validate - * @throws IllegalArgumentException if the value falls out of the boundaries - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * exclusive values specified; otherwise, throws an exception. + * + *
Validate.exclusiveBetween(0.1, 2.1, 1.1);
+ * + * @param start the exclusive start value + * @param end the exclusive end value + * @param value the value to validate + * @throws IllegalArgumentException if the value falls out of the boundaries + * + * @since 3.3 + */ @SuppressWarnings("boxing") public static void exclusiveBetween(final double start, final double end, final double value) { // TODO when breaking BC, consider returning value @@ -1203,21 +1203,21 @@ public class Validate { } /** - * Validate that the specified primitive value falls between the two - * exclusive values specified; otherwise, throws an exception with the - * specified message. - * - *
Validate.exclusiveBetween(0.1, 2.1, 1.1, "Not in range");
- * - * @param start the exclusive start value - * @param end the exclusive end value - * @param value the value to validate - * @param message the exception message if invalid, not null - * - * @throws IllegalArgumentException if the value falls outside the boundaries - * - * @since 3.3 - */ + * Validate that the specified primitive value falls between the two + * exclusive values specified; otherwise, throws an exception with the + * specified message. + * + *
Validate.exclusiveBetween(0.1, 2.1, 1.1, "Not in range");
+ * + * @param start the exclusive start value + * @param end the exclusive end value + * @param value the value to validate + * @param message the exception message if invalid, not null + * + * @throws IllegalArgumentException if the value falls outside the boundaries + * + * @since 3.3 + */ public static void exclusiveBetween(final double start, final double end, final double value, final String message) { // TODO when breaking BC, consider returning value if (value <= start || value >= end) { diff --git a/src/main/java/org/apache/commons/lang3/math/NumberUtils.java b/src/main/java/org/apache/commons/lang3/math/NumberUtils.java index 50c09236f..ab321b086 100644 --- a/src/main/java/org/apache/commons/lang3/math/NumberUtils.java +++ b/src/main/java/org/apache/commons/lang3/math/NumberUtils.java @@ -644,8 +644,8 @@ public class NumberUtils { *

If a type specifier is not found, it will check for a decimal point * and then try successively larger types from {@code Integer} to * {@code BigInteger} and from {@code Float} to - * {@code BigDecimal}.

- * + * {@code BigDecimal}.

+ * *

* Integral values with a leading {@code 0} will be interpreted as octal; the returned number will * be Integer, Long or BigDecimal as appropriate.