Skip to content

Commit f27b22f

Browse files
committed
Test case LANG-1765
1 parent f6b5084 commit f27b22f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.apache.commons.lang3.compare.ObjectToStringComparator;
4444
import org.apache.commons.lang3.reflect.testbed.Ambig;
4545
import org.apache.commons.lang3.reflect.testbed.Annotated;
46+
import org.apache.commons.lang3.reflect.testbed.AnotherParent;
4647
import org.apache.commons.lang3.reflect.testbed.Foo;
4748
import org.apache.commons.lang3.reflect.testbed.PrivatelyShadowedChild;
4849
import org.apache.commons.lang3.reflect.testbed.PublicChild;
@@ -451,6 +452,7 @@ public void testReadDeclaredNamedFieldForceAccess() throws Exception {
451452

452453
@Test
453454
public void testReadDeclaredNamedStaticField() throws Exception {
455+
assertThrows(NullPointerException.class, () -> FieldUtils.readDeclaredStaticField(AnotherParent.class, "doesNotExist"));
454456
assertEquals(Foo.VALUE, FieldUtils.readDeclaredStaticField(Foo.class, "VALUE"));
455457
assertThrows(
456458
NullPointerException.class, () ->

0 commit comments

Comments
 (0)