Hi Robert,

The weaving hooks are potentially (if any are registered) run on the class
bytes between the loading of the bytes and calling defineClass() IIRC, not
sure what static initializers have to do with this as they are run after
the defineClass() has been called I think?

Best regards,

David

On Fri, 22 Feb 2019 at 11:35, Robert Munteanu <[email protected]> wrote:

> On Fri, 2019-02-22 at 10:47 +0000, David Bosschaert wrote:
> > Hi Robert,
> >
> > Regarding the question in the subject line "Why does loading classes
> > reach
> > into the service registry?"
> > This is most likely to see if there are any registered weaving hooks
> > which
> > can weave the class bytes.
> >
> > Best regards,
> >
> > David
> >
> > [1]
> >
> https://osgi.org/specification/osgi.core/7.0.0/framework.weavinghooks.html
>
> Interesting. So I guess your advice would be "don't do non-trivial
> stuff in static initializers since they might break your class?".
>
> Robert
>
>

Reply via email to