On 29.04.20 13:37, Remi Forax wrote:
Hi Jochen,
Per the Java spec, calling an empty static method of the inner class works.
but it has to work for any arbitrary inner class.
The Class.forName variant Kasper mentioned and I thought I tired already
(but did not) works for me.
Thanks
bye Jochen
On 29.04.20 13:39, Kasper Nielsen wrote:
Hi Jochen,
Is there anything stopping you for doing something like:
try {
Class.forName(innerClassName, true, initalizeClass.getClassLoader());
} catch (ClassNotFoundException e) {
throw new ExceptionInInitializerError(e); // Should never happe
Hi Jochen,
Is there anything stopping you for doing something like:
try {
Class.forName(innerClassName, true, initalizeClass.getClassLoader());
} catch (ClassNotFoundException e) {
throw new ExceptionInInitializerError(e); // Should never happen
}
I know it is not pretty.
/Kasper
On
Hi Jochen,
Per the Java spec, calling an empty static method of the inner class works.
Rémi
- Mail original -
> De: "Jochen Theodorou"
> À: "jigsaw-dev"
> Envoyé: Mercredi 29 Avril 2020 13:23:47
> Objet: replacements for Unsafe
> Hi,
>
> wh
Hi,
when jigsaw started there was a lot of talk about providing alternatives
to what Unsafe offers. Today I am facing a problem I cannot solve
anymore it seems with this.
My problem is that I need to ensure the static block of an inner class
has been executed before I do something, because the s