File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
core/test/com/google/inject Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ protected void configure() {
305
305
StackTraceElement [] stackTraceElement = t .getStackTrace ();
306
306
int frame = 0 ;
307
307
assertEquals ("explode" , stackTraceElement [frame ++].getMethodName ());
308
- while (stackTraceElement [frame ]. getClassName (). startsWith ( "java.lang.invoke.LambdaForm" )) {
308
+ while (isLambdaFrame ( stackTraceElement [frame ])) {
309
309
frame ++; // ignore lambda frames when running tests with ShowHiddenFrames
310
310
}
311
311
assertEquals ("invoke" , stackTraceElement [frame ++].getMethodName ());
@@ -315,6 +315,12 @@ protected void configure() {
315
315
}
316
316
}
317
317
318
+ private static boolean isLambdaFrame (StackTraceElement element ) {
319
+ var name = element .getClassName ();
320
+ return name .startsWith ("java.lang.invoke.LambdaForm" )
321
+ || name .startsWith ("java.lang.invoke.DirectMethodHandle" );
322
+ }
323
+
318
324
@ Test
319
325
public void testNotInterceptedMethodsInInterceptedClassDontAddFrames () {
320
326
Injector injector =
You can’t perform that action at this time.
0 commit comments