Hiding the lambda proxy frame

Robert Field Robert.Field at oracle.com
Tue Jun 11 08:01:58 PDT 2013


Good point.
I have submitted     8016334: Hide the lambda proxy frame
And assigned it to myself.

Thanks,
Robert

On 6/11/13 5:54 AM, Remi Forax wrote:
> Hi Brian, Paul, Robert, hi all,
> currently when you print a stacktrace that show a call inside a lambda,
> users can see the the frame corresponding to the method of the generated
> proxy.
>
> By example:
> java.lang.Throwable
>       StackTraceTest.lambda$0(StackTraceTest.java:6)
>       StackTraceTest$$Lambda$1.run(Unknown Source)     <---   ugly, isn't it
>       StackTraceTest.main(StackTraceTest.java:8)
>
> I think this line should not be visible to user, it doesn't provide
> useful information,
> just make the stack trace longer than it should.
>
> A method can be marked hidden in a stack trace by using the annotation
> LambdaFom.Hidden.
>
> With ASM, one just have to add the following line:
>
> mv.visitAnnotation("Ljava/lang/invoke/LambdaForm$Hidden;", true);
>
> cheers,
> Rémi
>
>



More information about the lambda-dev mailing list