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
commit f27b22f7da42b179586e5b7df4614c4916d63097 Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Fri Mar 21 09:39:48 2025 -0400 Test case LANG-1765 --- src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java index a8de9b8a4..7b24d80ac 100644 --- a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java @@ -43,6 +43,7 @@ import org.apache.commons.lang3.compare.ObjectToStringComparator; import org.apache.commons.lang3.reflect.testbed.Ambig; import org.apache.commons.lang3.reflect.testbed.Annotated; +import org.apache.commons.lang3.reflect.testbed.AnotherParent; import org.apache.commons.lang3.reflect.testbed.Foo; import org.apache.commons.lang3.reflect.testbed.PrivatelyShadowedChild; import org.apache.commons.lang3.reflect.testbed.PublicChild; @@ -451,6 +452,7 @@ public void testReadDeclaredNamedFieldForceAccess() throws Exception { @Test public void testReadDeclaredNamedStaticField() throws Exception { + assertThrows(NullPointerException.class, () -> FieldUtils.readDeclaredStaticField(AnotherParent.class, "doesNotExist")); assertEquals(Foo.VALUE, FieldUtils.readDeclaredStaticField(Foo.class, "VALUE")); assertThrows( NullPointerException.class, () ->