Skip to content

Commit 68123b0

Browse files
committed
Update MethodHandleUtilsTest.java
1 parent 9e71819 commit 68123b0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

microsphere-java-core/src/test/java/io/microsphere/invoke/MethodHandleUtilsTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import static io.microsphere.invoke.MethodHandleUtils.findStatic;
2525
import static io.microsphere.invoke.MethodHandleUtils.findVirtual;
26+
import static io.microsphere.invoke.MethodHandleUtils.handleInvokeExactFailure;
2627
import static io.microsphere.invoke.MethodHandleUtils.lookup;
2728
import static io.microsphere.invoke.MethodHandlesLookupUtils.NOT_FOUND_METHOD_HANDLE;
2829
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -89,6 +90,12 @@ public void testFindStaticOnPrivateStaticMethod() throws Throwable {
8990
testFindStatic("privateStaticMethod");
9091
}
9192

93+
@Test
94+
public void testHandleInvokeExactFailure() {
95+
MethodHandle methodHandle = findVirtual(MethodHandleUtilsTest.class, "privateMethod");
96+
handleInvokeExactFailure(new Throwable("testing"), methodHandle);
97+
}
98+
9299
private void testFindVirtual(String methodName) throws Throwable {
93100
MethodHandle methodHandle = findVirtual(MethodHandleUtilsTest.class, methodName);
94101
assertEquals(methodName, (String) methodHandle.invokeExact(this));

0 commit comments

Comments
 (0)