Hiding the lambda proxy frame

Remi Forax forax at univ-mlv.fr
Tue Jun 11 09:56:19 PDT 2013

On 06/11/2013 05:01 PM, Robert Field wrote:
> Good point.
> I have submitted     8016334: Hide the lambda proxy frame
> And assigned it to myself.
> Thanks,
> Robert

Thank you Robert,
Brian remind me that because this annotation is currently Hotspot 
specific, we have to made it public first and part of the JDK
(either as a top-level annotation in java.lang.invoke or as inner in 


> 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