Avoiding sun.misc.Unsafe and embracing modules in Java libraries: missing links

Rafael Winterhalter rafael.wth at gmail.com
Tue Apr 10 11:15:59 UTC 2018


Thanks for the reference.

As for the proxy API, I think that this should be reworked anyways as the
lookup on each call would be rather expensive.

I also see the other issues that I mentioned as more pressing.

Thank you and best regards, Rafael

2018-04-10 11:54 GMT+02:00 Alan Bateman <Alan.Bateman at oracle.com>:

> On 09/04/2018 20:48, Rafael Winterhalter wrote:
>
>> Hei Alan,
>> maybe I am doing it wrong but this is my example. I created a module with
>> two interfaces bar.Bar and qux.Qux that both define a default method String
>> foo() { return "foo"; }. The module exports bar and exports and opens qux.
>> From another module that reads that first module I run the following code:
>>
> Thanks for the test.
>
> I think the issue is that findSpecial can never work when invoked on a
> Lookup to a lookup class in a named module and the proposed caller class
> for invokespecial (specialCaller) is in a different module. It's not an
> issue when the lookup class in an unnamed module, or when the lookup class
> in a named module and specialCaller is in the same module.
>
> I'm sure John will jump in but I think if JDK-8173978 is implemented then
> it will go a long way to address this anomaly.
>
> -Alan
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8173978
>


More information about the jigsaw-dev mailing list