Skip to content

Commit 3a86037

Browse files
authored
Merge pull request #18379 from ulisseslima/bael-4384-quickfix_private-method-reflection
bael-4384 - passing null instead of class
2 parents 3345510 + 5f051bc commit 3a86037

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core-java-modules/core-java-reflection-2/src/test/java/com/baeldung/reflection/access/privatemethods/InvokePrivateMethodsUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void whenSearchingForLongValueInSubsequenceUsingReflection_thenTheCorrectIndexOf
1616
Method indexOfMethod = LongArrayUtil.class.getDeclaredMethod("indexOf", long[].class, long.class, int.class, int.class);
1717
indexOfMethod.setAccessible(true);
1818

19-
assertEquals(2, indexOfMethod.invoke(LongArrayUtil.class, someLongArray, 1L, 1, someLongArray.length), "The index should be 2.");
19+
assertEquals(2, indexOfMethod.invoke(null, someLongArray, 1L, 1, someLongArray.length), "The index should be 2.");
2020
}
2121

2222
@Test

0 commit comments

Comments
 (0)