As for the need to inject classes into 'new' packages, in Mockito we solve
this easily by 'claiming' a package by defining a static dummy class within
it which we then use as a hook for injection using a lookup. This works
well for us, and I do of course not know the explicit requirements of
others
On 16/04/2021 21:09, Rafael Winterhalter wrote:
I have never seen a need for a non-agent to define a class in a
non-existing package. Injection is typically required if you want to work
with package-private types or methods which is really only relevant for the
Spring framework, but even there I
> To allow agents the definition of auxiliary classes, an API is needed to
> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or
> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed
> from `sun.misc.Unsafe`.
Rafael Winterhalter has refreshed the c
I have never seen a need for a non-agent to define a class in a
non-existing package. Injection is typically required if you want to work
with package-private types or methods which is really only relevant for the
Spring framework, but even there I do not think it's such a big area that
it cannot b
On Fri, 16 Apr 2021 13:44:16 GMT, Rafael Winterhalter
wrote:
> To allow agents the definition of auxiliary classes, an API is needed to
> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or
> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed
>
> De: "Rafael Winterhalter"
> À: "Remi Forax"
> Cc: "Rafael Winterhalter" , "core-libs-dev"
> , "serviceability-dev"
>
> Envoyé: Vendredi 16 Avril 2021 18:41:26
> Objet: Re: RFR: 8200559: Java agents doing instrumentati
On 16/04/2021 17:40, Rafael Winterhalter wrote:
:
I will try to make my case on the mailing list. I hoped this could get resolved
within the release of Java 17 as this would make it possible to write agents
without use of Unsafe API to support Java 17 and later. Since agents often are
suppleme
gt; *Cc: *"Rafael Winterhalter" ,
> "core-libs-dev" , "serviceability-dev" <
> serviceability-dev@openjdk.java.net>
> *Envoyé: *Vendredi 16 Avril 2021 18:27:46
> *Objet: *Re: RFR: 8200559: Java agents doing instrumentation need a means
> to defin
On Fri, 16 Apr 2021 13:44:16 GMT, Rafael Winterhalter
wrote:
> To allow agents the definition of auxiliary classes, an API is needed to
> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or
> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed
>
> De: "Rafael Winterhalter"
> À: "Remi Forax"
> Cc: "Rafael Winterhalter" , "core-libs-dev"
> , "serviceability-dev"
>
> Envoyé: Vendredi 16 Avril 2021 18:27:46
> Objet: Re: RFR: 8200559: Java agents doing instrumentation
nal -
> > De: "Rafael Winterhalter"
> > À: "core-libs-dev" ,
> "serviceability-dev"
> > Envoyé: Vendredi 16 Avril 2021 15:52:07
> > Objet: RFR: 8200559: Java agents doing instrumentation need a means to
> define auxilary classes
>
> &g
On Fri, 16 Apr 2021 13:44:16 GMT, Rafael Winterhalter
wrote:
> To allow agents the definition of auxiliary classes, an API is needed to
> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or
> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed
>
- Mail original -
> De: "Rafael Winterhalter"
> À: "core-libs-dev" , "serviceability-dev"
>
> Envoyé: Vendredi 16 Avril 2021 15:52:07
> Objet: RFR: 8200559: Java agents doing instrumentation need a means to define
> auxilary classe
To allow agents the definition of auxiliary classes, an API is needed to allow
this. Currently, this is often achieved by using `sun.misc.Unsafe` or
`jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed from
`sun.misc.Unsafe`.
-
Commit messages:
- 8200559: Jav
14 matches
Mail list logo