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 c0d63d3e3 Sort members
c0d63d3e3 is described below
commit c0d63d3e3c5c74b46eaa4a03fbb33c4d2acb5c81
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Dec 31 17:14:14 2025 -0500
Sort members
---
.../commons/lang3/reflect/TypeUtilsTest.java | 70 +++++++++++-----------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
index f03559874..5725f324a 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -192,6 +192,23 @@ public static <U> Iterable<U>
methodWithGenericReturnType() {
}
}
+ static class LexOrdering<T> extends MyOrdering<Iterable<T>> implements
Serializable {
+ private static final long serialVersionUID = 1L;
+ }
+
+ interface MyComparator<T> {
+ }
+
+ static class MyException extends Exception implements Iterable<Throwable> {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Iterator<Throwable> iterator() {
+ return null;
+ }
+ }
+
/** This non-static inner class is parameterized. */
private class MyInnerClass<T> {
@@ -200,6 +217,13 @@ class MyInnerClass2<X> {
}
}
+ static class MyNonTransientException extends MyException {
+ private static final long serialVersionUID = 1L;
+ }
+
+ static class MyOrdering<T> implements MyComparator<T> {
+ }
+
public class Other<T> implements This<String, T> {
// empty
}
@@ -358,41 +382,6 @@ void test_LANG_1698() {
assertEquals("java.util.function.Function<? super T, ? extends U>",
typeName);
}
- @Test
- void test_LANG_1702() throws NoSuchMethodException, SecurityException {
- final Type type =
TypeUtilsTest.class.getDeclaredMethod("aMethod").getGenericReturnType();
-
- // any map will do
- final Map<TypeVariable<?>, Type> typeArguments =
Collections.emptyMap();
-
- // this fails with a stack overflow
- final Type unrolledType = TypeUtils.unrollVariables(typeArguments,
type);
- }
-
- static class MyException extends Exception implements Iterable<Throwable> {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- public Iterator<Throwable> iterator() {
- return null;
- }
- }
-
- static class MyNonTransientException extends MyException {
- private static final long serialVersionUID = 1L;
- }
-
- interface MyComparator<T> {
- }
-
- static class MyOrdering<T> implements MyComparator<T> {
- }
-
- static class LexOrdering<T> extends MyOrdering<Iterable<T>> implements
Serializable {
- private static final long serialVersionUID = 1L;
- }
-
/**
* Tests that a parameterized type with a nested generic argument is
correctly
* evaluated for assignability to a wildcard lower-bounded type.
@@ -412,6 +401,17 @@ public void test_LANG_1700() {
() -> String.format("Type %s should not be assignable to %s",
TypeUtils.toString(from), TypeUtils.toString(to)));
}
+ @Test
+ void test_LANG_1702() throws NoSuchMethodException, SecurityException {
+ final Type type =
TypeUtilsTest.class.getDeclaredMethod("aMethod").getGenericReturnType();
+
+ // any map will do
+ final Map<TypeVariable<?>, Type> typeArguments =
Collections.emptyMap();
+
+ // this fails with a stack overflow
+ final Type unrolledType = TypeUtils.unrollVariables(typeArguments,
type);
+ }
+
@Test
void testContainsTypeVariables() throws NoSuchMethodException {
assertFalse(TypeUtils.containsTypeVariables(Test1.class.getMethod("m0").getGenericReturnType()));