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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 129ea4149 Replace JUnit @DisplayName with Javadoc to make Maven output
meaningful
129ea4149 is described below
commit 129ea4149bc933f8ac7ab798f257cbf57c99e73b
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Dec 20 09:18:15 2025 -0500
Replace JUnit @DisplayName with Javadoc to make Maven output meaningful
---
.../org/apache/commons/lang3/ClassUtilsTest.java | 7 +++---
.../org/apache/commons/lang3/FunctionsTest.java | 5 ++---
.../commons/lang3/compare/ComparableUtilsTest.java | 25 +++++++++++-----------
.../lang3/exception/ExceptionUtilsTest.java | 5 ++---
.../commons/lang3/function/FailableTest.java | 5 ++---
5 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
index f4cdc9c47..9029bb1e3 100644
--- a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
@@ -48,7 +48,6 @@
import org.apache.commons.lang3.reflect.testbed.GenericParent;
import org.apache.commons.lang3.reflect.testbed.StringParameterizedChild;
import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junitpioneer.jupiter.params.IntRangeSource;
@@ -191,13 +190,13 @@ void test_getAbbreviatedName_Class() {
}
@Test
- @DisplayName("When the desired length is negative then exception is
thrown")
+ /** When the desired length is negative then exception is thrown */
void test_getAbbreviatedName_Class_NegativeLen() {
assertIllegalArgumentException(() ->
ClassUtils.getAbbreviatedName(String.class, -10));
}
@Test
- @DisplayName("When the desired length is zero then exception is thrown")
+ /** When the desired length is zero then exception is thrown */
void test_getAbbreviatedName_Class_ZeroLen() {
assertIllegalArgumentException(() ->
ClassUtils.getAbbreviatedName(String.class, 0));
}
@@ -231,7 +230,7 @@ void test_getAbbreviatedName_String() {
* implementation detail, but it is not a guaranteed feature of the
implementation.
*/
@Test
- @DisplayName("When the length hint is longer than the actual length then
the same String object is returned")
+ /** When the length hint is longer than the actual length then the same
String object is returned */
void test_getAbbreviatedName_TooLongHint() {
final String className = "java.lang.String";
Assertions.assertSame(className,
ClassUtils.getAbbreviatedName(className, className.length() + 1));
diff --git a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
index 884375a17..f35a15a65 100644
--- a/src/test/java/org/apache/commons/lang3/FunctionsTest.java
+++ b/src/test/java/org/apache/commons/lang3/FunctionsTest.java
@@ -42,7 +42,6 @@
import org.apache.commons.lang3.Functions.FailableConsumer;
import org.apache.commons.lang3.Functions.FailableFunction;
import org.apache.commons.lang3.Functions.FailableSupplier;
-import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
/**
@@ -666,7 +665,7 @@ void testBiFunction() {
}
@Test
- @DisplayName("Test that asPredicate(FailableBiPredicate) is converted to
-> BiPredicate ")
+ /** Test that asPredicate(FailableBiPredicate) is converted to ->
BiPredicate */
void testBiPredicate() {
FailureOnOddInvocations.invocations = 0;
final Functions.FailableBiPredicate<Object, Object, Throwable>
failableBiPredicate = (t1,
@@ -768,7 +767,7 @@ void testGetSupplier() {
}
@Test
- @DisplayName("Test that asPredicate(FailablePredicate) is converted to ->
Predicate ")
+ /** Test that asPredicate(FailablePredicate) is converted to -> Predicate
*/
void testPredicate() {
FailureOnOddInvocations.invocations = 0;
final Functions.FailablePredicate<Object, Throwable> failablePredicate
= t -> FailureOnOddInvocations
diff --git
a/src/test/java/org/apache/commons/lang3/compare/ComparableUtilsTest.java
b/src/test/java/org/apache/commons/lang3/compare/ComparableUtilsTest.java
index e0daca343..ec09ff68e 100644
--- a/src/test/java/org/apache/commons/lang3/compare/ComparableUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/compare/ComparableUtilsTest.java
@@ -25,7 +25,6 @@
import java.time.Instant;
import org.apache.commons.lang3.AbstractLangTest;
-import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
@@ -34,11 +33,11 @@ class ComparableUtilsTest extends AbstractLangTest {
@Nested
final class A_is_1 {
- @DisplayName("B is 0 (B < A)")
+ /** B is 0 (B < A) */
@Nested
final class B_is_0 {
- @DisplayName("C is 0 ([B=C] < A)")
+ /** C is 0 ([B=C] < A) */
@Nested
final class C_is_0 {
@@ -66,7 +65,7 @@ void static_betweenExclusive_returns_false() {
}
- @DisplayName("C is 1 (B < A = C)")
+ /** C is 1 (B < A = C) */
@Nested
final class C_is_1 {
@@ -93,7 +92,7 @@ void static_betweenExclusive_returns_false() {
}
}
- @DisplayName("C is 10 (B < A < C)")
+ /** C is 10 (B < A < C) */
@Nested
final class C_is_10 {
@@ -168,11 +167,11 @@ void static_lt_returns_false() {
}
}
- @DisplayName("B is 1 (B = A)")
+ /** B is 1 (B = A) */
@Nested
final class B_is_1 {
- @DisplayName("C is 0 (B = A > C)")
+ /** C is 0 (B = A > C) */
@Nested
final class C_is_0 {
@@ -199,7 +198,7 @@ void static_betweenExclusive_returns_false() {
}
}
- @DisplayName("C is 1 (B = A = C)")
+ /** C is 1 (B = A = C) */
@Nested
final class C_is_1 {
@@ -226,7 +225,7 @@ void static_betweenExclusive_returns_false() {
}
}
- @DisplayName("C is 10 (B = A < C)")
+ /** C is 10 (B = A < C) */
@Nested
final class C_is_10 {
@@ -301,11 +300,11 @@ void static_lt_returns_false() {
}
}
- @DisplayName("B is 10 (B > A)")
+ /** B is 10 (B > A) */
@Nested
final class B_is_10 {
- @DisplayName("C is 0 (B > A > C)")
+ /** C is 0 (B > A > C) */
@Nested
final class C_is_0 {
@@ -332,7 +331,7 @@ void static_betweenExclusive_returns_true() {
}
}
- @DisplayName("C is 1 (B > A = C)")
+ /** C is 1 (B > A = C) */
@Nested
final class C_is_1 {
@@ -359,7 +358,7 @@ void static_betweenExclusive_returns_false() {
}
}
- @DisplayName("C is 10 ([B,C] > A)")
+ /** C is 10 ([B,C] > A) */
@Nested
final class C_is_10 {
diff --git
a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
index 03cf3e4e9..9ccdfdfde 100644
--- a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
@@ -42,7 +42,6 @@
import org.apache.commons.lang3.test.NotVisibleExceptionFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
/**
@@ -393,7 +392,7 @@ void testGetRootCauseStackTraceList_Throwable() {
}
@Test
- @DisplayName("getStackFrames returns empty string array when the argument
is null")
+ /** getStackFrames returns empty string array when the argument is null */
void testgetStackFramesHappyPath() {
final String[] actual = ExceptionUtils.getStackFrames(new Throwable() {
private static final long serialVersionUID = 1L;
@@ -419,7 +418,7 @@ public void printStackTrace(final PrintWriter s) {
}
@Test
- @DisplayName("getStackFrames returns the string array of the stack frames
when there is a real exception")
+ /** getStackFrames returns the string array of the stack frames when there
is a real exception */
void testgetStackFramesNullArg() {
final String[] actual = ExceptionUtils.getStackFrames((Throwable)
null);
assertEquals(0, actual.length);
diff --git a/src/test/java/org/apache/commons/lang3/function/FailableTest.java
b/src/test/java/org/apache/commons/lang3/function/FailableTest.java
index 51634dc84..a7a8be196 100644
--- a/src/test/java/org/apache/commons/lang3/function/FailableTest.java
+++ b/src/test/java/org/apache/commons/lang3/function/FailableTest.java
@@ -41,7 +41,6 @@
import org.apache.commons.lang3.AbstractLangTest;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
/**
@@ -853,7 +852,7 @@ void testBiFunctionAndThen() throws IOException {
}
@Test
- @DisplayName("Test that asPredicate(FailableBiPredicate) is converted to
-> BiPredicate ")
+ /** Test that asPredicate(FailableBiPredicate) is converted to ->
BiPredicate */
void testBiPredicate() {
FailureOnOddInvocations.invocations = 0;
final FailableBiPredicate<Object, Object, Throwable>
failableBiPredicate = (t1, t2) -> FailureOnOddInvocations
@@ -1607,7 +1606,7 @@ void testLongUnaryOperatorIdentity() throws Throwable {
}
@Test
- @DisplayName("Test that asPredicate(FailablePredicate) is converted to ->
Predicate ")
+ /** Test that asPredicate(FailablePredicate) is converted to -> Predicate
*/
void testPredicate() {
FailureOnOddInvocations.invocations = 0;
final FailablePredicate<Object, Throwable> failablePredicate = t ->
FailureOnOddInvocations.testGetBool();