File tree Expand file tree Collapse file tree
microsphere-java-core/src/test/java/io/microsphere/invoke Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424import static io .microsphere .invoke .MethodHandleUtils .findStatic ;
2525import static io .microsphere .invoke .MethodHandleUtils .findVirtual ;
26+ import static io .microsphere .invoke .MethodHandleUtils .handleInvokeExactFailure ;
2627import static io .microsphere .invoke .MethodHandleUtils .lookup ;
2728import static io .microsphere .invoke .MethodHandlesLookupUtils .NOT_FOUND_METHOD_HANDLE ;
2829import 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 ));
You can’t perform that action at this time.
0 commit comments