Need to access syntactic method out of package using Bootstrap attribute

Remi Forax forax at univ-mlv.fr
Wed Jun 17 19:26:59 UTC 2015


Hi Puneet,

On 06/17/2015 06:58 PM, Vladimir Ivanov wrote:
> Puneet,
>
> How did you end up with such bytecode? Was it generated by javac?
>
> Rejecting access to a method which is not visible from the context 
> where invokedynamic is linked is the correct behavior.

The error you describe is weird,
the first time invokedynamic is called, all bootstrap arguments are created.
But the JDK uses an internal API to create the MethodHandle (the class 
java.lang.invoke.MemberName) and not the reflection API.

Could you also post the stack trace of the error ?

>
> Best regards,
> Vladimir Ivanov

regards,
Rémi

>
> On 6/5/15 6:59 AM, Bansal, Puneet wrote:
>> Hi All
>>
>> I got an strange error with Synthetic methods and bootstrap methods. In
>> my one of application, my bootstrap entry is locating a synthetic method
>> of another class(this class is part of another package).
>>
>> In above screenshot, this lambda$main$0 is a syntactic method and part
>> of another package.
>>
>> While execution, I am getting reflection error because Synthetic methods
>> are not accessible from outside package. Can anyone help me to resolve
>> this issue?
>>
>> Regards
>>
>> Puneet
>>
>>
>> The information contained in this electronic mail transmission
>> may be privileged and confidential, and therefore, protected
>> from disclosure. If you have received this communication in
>> error, please notify us immediately by replying to this
>> message and deleting it from your computer without copying
>> or disclosing it.
>>
>>
>>
>> _______________________________________________
>> mlvm-dev mailing list
>> mlvm-dev at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev



More information about the mlvm-dev mailing list