Skip to content

Commit d69c9f3

Browse files
committed
2 parents 20d3ad5 + 08d28f5 commit d69c9f3

File tree

10 files changed

+38
-38
lines changed

10 files changed

+38
-38
lines changed

src/main/java/org/apache/commons/lang3/builder/AbstractSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* Abstracts supplying an instance of {@code T}. Use to implement the builder pattern.
2424
*
25-
* @param <T> the type of instances to build.
25+
* @param <T> The type of results supplied by this supplier.
2626
* @param <B> the type of builder.
2727
* @param <E> The kind of thrown exception or error.
2828
* @since 3.14.0

src/main/java/org/apache/commons/lang3/concurrent/AbstractConcurrentInitializer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public abstract class AbstractConcurrentInitializer<T, E extends Exception> impl
3636
/**
3737
* Builds a new instance for subclasses.
3838
*
39-
* @param <T> the type of the object managed by the initializer class.
40-
* @param <I> the type of the initializer class.
41-
* @param <B> the type of builder.
39+
* @param <I> The type of results supplied by this builder.
40+
* @param <T> The type of the object managed by the initializer class.
41+
* @param <B> The type of builder.
4242
* @param <E> The exception type thrown by {@link #initialize()}.
4343
*/
4444
public abstract static class AbstractBuilder<I extends AbstractConcurrentInitializer<T, E>, T, B extends AbstractBuilder<I, T, B, E>, E extends Exception>

src/main/java/org/apache/commons/lang3/concurrent/AtomicInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public class AtomicInitializer<T> extends AbstractConcurrentInitializer<T, Concu
7070
/**
7171
* Builds a new instance.
7272
*
73-
* @param <T> the type of the object managed by the initializer.
74-
* @param <I> the type of the initializer managed by this builder.
73+
* @param <T> The type of results supplied by this builder.
74+
* @param <I> The type of the initializer managed by this builder.
7575
* @since 3.14.0
7676
*/
7777
public static class Builder<I extends AtomicInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, ConcurrentException> {

src/main/java/org/apache/commons/lang3/concurrent/AtomicSafeInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public class AtomicSafeInitializer<T> extends AbstractConcurrentInitializer<T, C
5959
/**
6060
* Builds a new instance.
6161
*
62-
* @param <T> the type of the object managed by the initializer.
63-
* @param <I> the type of the initializer managed by this builder.
62+
* @param <T> The type of results supplied by this builder.
63+
* @param <I> The type of the initializer managed by this builder.
6464
* @since 3.14.0
6565
*/
6666
public static class Builder<I extends AtomicSafeInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, ConcurrentException> {

src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public class BackgroundInitializer<T> extends AbstractConcurrentInitializer<T, E
9090
/**
9191
* Builds a new instance.
9292
*
93-
* @param <T> the type of the object managed by the initializer.
94-
* @param <I> the type of the initializer managed by this builder.
93+
* @param <T> The type of results supplied by this builder.
94+
* @param <I> The type of the initializer managed by this builder.
9595
* @since 3.14.0
9696
*/
9797
public static class Builder<I extends BackgroundInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, Exception> {

src/main/java/org/apache/commons/lang3/concurrent/LazyInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public class LazyInitializer<T> extends AbstractConcurrentInitializer<T, Concurr
7474
/**
7575
* Builds a new instance.
7676
*
77-
* @param <T> the type of the object managed by the initializer.
78-
* @param <I> the type of the initializer managed by this builder.
77+
* @param <T> The type of results supplied by this builder.
78+
* @param <I> The type of the initializer managed by this builder.
7979
* @since 3.14.0
8080
*/
8181
public static class Builder<I extends LazyInitializer<T>, T> extends AbstractBuilder<I, T, Builder<I, T>, ConcurrentException> {

src/main/java/org/apache/commons/lang3/function/FailableSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* A functional interface like {@link Supplier} that declares a {@link Throwable}.
2424
*
25-
* @param <T> Return type.
25+
* @param <T> The type of results supplied by this supplier.
2626
* @param <E> The kind of thrown exception or error.
2727
* @since 3.11
2828
*/

src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ final class LANG1261ChildObject extends LANG1261ParentObject {
252252
assertTrue(ArrayUtils.contains(array, new LANG1261ParentObject()));
253253
}
254254

255+
@Test
256+
public void testContainsAnyEnum() {
257+
assertTrue(ArrayUtils.containsAny(ElementType.values(), ElementType.ANNOTATION_TYPE));
258+
assertFalse(ArrayUtils.containsAny(ElementType.values(), (ElementType) null));
259+
}
260+
255261
@Test
256262
public void testContainsAnyInt() {
257263
final int[] array = {0, 1, 2, 3, 0};
@@ -262,12 +268,6 @@ public void testContainsAnyInt() {
262268
assertTrue(ArrayUtils.containsAny(array, 3));
263269
}
264270

265-
@Test
266-
public void testContainsAnyEnum() {
267-
assertTrue(ArrayUtils.containsAny(ElementType.values(), ElementType.ANNOTATION_TYPE));
268-
assertFalse(ArrayUtils.containsAny(ElementType.values(), (ElementType) null));
269-
}
270-
271271
@Test
272272
public void testContainsAnyObject() {
273273
final Object[] array = {"0", "1", "2", "3", null, "0"};

src/test/java/org/apache/commons/lang3/StringsTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ public void testCaseInsensitiveConstant() {
5757
assertFalse(Strings.CI.isCaseSensitive());
5858
}
5959

60-
@Test
61-
public void testCaseSensitiveConstant() {
62-
assertNotNull(Strings.CS);
63-
assertTrue(Strings.CS.isCaseSensitive());
64-
}
65-
6660
/**
6761
* Expanding the existing test group {@link StringUtilsStartsEndsWithTest#testStartsWithAny()} to include case-insensitive cases
6862
*/
@@ -84,13 +78,10 @@ public void testCaseInsensitiveStartsWithAny() {
8478
assertTrue(Strings.CI.startsWithAny(new StringBuffer("AbCxYz"), new StringBuilder("XyZ"), new StringBuffer("abc")));
8579
}
8680

87-
@ParameterizedTest
88-
@MethodSource("stringsFactory")
89-
public void testEqualsStrings(final Strings strings) {
90-
final String nullStr = null;
91-
assertTrue(strings.equals(nullStr, nullStr));
92-
assertFalse(strings.equals(nullStr, ""));
93-
assertFalse(strings.equals("", nullStr));
81+
@Test
82+
public void testCaseSensitiveConstant() {
83+
assertNotNull(Strings.CS);
84+
assertTrue(Strings.CS.isCaseSensitive());
9485
}
9586

9687
@ParameterizedTest
@@ -101,4 +92,13 @@ public void testEqualsCharSequence(final Strings strings) {
10192
assertFalse(strings.equals(nullCharSequence, ""));
10293
assertFalse(strings.equals("", nullCharSequence));
10394
}
95+
96+
@ParameterizedTest
97+
@MethodSource("stringsFactory")
98+
public void testEqualsStrings(final Strings strings) {
99+
final String nullStr = null;
100+
assertTrue(strings.equals(nullStr, nullStr));
101+
assertFalse(strings.equals(nullStr, ""));
102+
assertFalse(strings.equals("", nullStr));
103+
}
104104
}

src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@
6262
* Tests MethodUtils
6363
*/
6464
public class MethodUtilsTest extends AbstractLangTest {
65-
interface InterfaceGetMatchingMethod {
66-
default void testMethod6() {
67-
}
68-
}
69-
7065
protected abstract static class AbstractGetMatchingMethod implements InterfaceGetMatchingMethod {
7166
public abstract void testMethod5(Exception exception);
7267
}
@@ -118,9 +113,9 @@ private static final class GetMatchingMethodImpl extends AbstractGetMatchingMeth
118113
public void testMethod5(final Exception exception) {
119114
}
120115
}
116+
121117
public static class GrandParentObject {
122118
}
123-
124119
public static class InheritanceBean {
125120
public void testOne(final GrandParentObject obj) {
126121
}
@@ -141,6 +136,11 @@ public void testTwo(final Object obj) {
141136
}
142137
}
143138

139+
interface InterfaceGetMatchingMethod {
140+
default void testMethod6() {
141+
}
142+
}
143+
144144
private static final class MethodDescriptor {
145145
final Class<?> declaringClass;
146146
final String name;

0 commit comments

Comments
 (0)