On 12/09/2015 09:43 AM, Stephane Epardaud wrote:
On 08/12/15 23:32, Mandy Chung wrote:
Good point. Existing code should use Annotation.annotationType()
instead of Annotation.getClass(). Annotation is an interface. Calling
annotation.getClass() will only return the implementation class that
ma
On 08/12/15 23:32, Mandy Chung wrote:
> Good point. Existing code should use Annotation.annotationType()
> instead of Annotation.getClass(). Annotation is an interface. Calling
> annotation.getClass() will only return the implementation class that
> may be encapsulated and not exported to the cal
> On Dec 8, 2015, at 2:05 PM, Peter Levart wrote:
>
> Hi Mandy,
>
> I don't think such special-casing for proxy classes is warranted and would
> just complicate security-sensitive code.
That was definitely a concern.
Good point. Existing code should use Annotation.annotationType() inste
On 12/08/2015 05:20 PM, Mandy Chung wrote:
I believe your code is calling Class::getMethod on proxy class something like:
Method m = proxy.getClass().getMethod(“Y”);
m.invoke(proxy,….);
The above reflects on the generated proxy class but not the proxy interface X.
If you did t
ax"
> Cc: jigsaw-dev@openjdk.java.net
> Envoyé: Mardi 8 Décembre 2015 16:28:40
> Objet: Re: Is there really a jdk.proxy1 module?
>
> "Usually used" by whom? You cannot create a proxy class in a class
> loader that cannot "see" the interfaces it implements, so if
On 08/12/15 17:20, Mandy Chung wrote:
> I believe your code is calling Class::getMethod on proxy class something like:
>
> Method m = proxy.getClass().getMethod(“Y”);
> m.invoke(proxy,….);
Right, it has to use reflection because it doesn't "read" the application.
> The above reflects
> On Dec 8, 2015, at 7:10 AM, Stephane Epardaud wrote:
>
> On 08/12/15 16:07, Peter Levart wrote:
>>
>>
>> Do you really have to addRead() ? Visibility of of classes
>> (Class.forName()) should only depend on class loader delegation.
>> Enumerating members, when you already have a java.lang.Cl
On 08/12/15 16:47, Peter Levart wrote:
> I have a scanner that can scan annotations of type X (by name) and
>> member Y (by name) so it must use reflection to load the annotation and
>> member.
>
> You can do that without readability of the target module.
Apparently not, see my exception.
>
>> I
Hi Stephane,
On 12/08/2015 04:10 PM, Stephane Epardaud wrote:
On 08/12/15 16:07, Peter Levart wrote:
Except now I have to add a read to scan annotations of another module,
Do you really have to addRead() ? Visibility of of classes
(Class.forName()) should only depend on class loader delegatio
ss loader that is usually used is not the module class loader
but one of its parent.
Rémi
- Mail original -
De: "David M. Lloyd"
À: jigsaw-dev@openjdk.java.net
Envoyé: Mardi 8 Décembre 2015 16:05:06
Objet: Re: Is there really a jdk.proxy1 module?
Or better yet, to the module de
Thanks, that helps, and that does describe what happened to me.
On 08/12/15 16:17, Alan Bateman wrote:
> The accessibility of the proxy class will be determined based on the
> accessibility of the proxy interfaces. If there are proxy interfaces
> is non-exported packages then the proxy will get ge
On 08/12/2015 14:21, Stephane Epardaud wrote:
I'm getting:
java.lang.IllegalAccessException: class
com.redhat.ceylon.model.loader.impl.reflect.mirror.ReflectionAnnotation
(in module com.redhat.ceylon.model) cannot access class
com.sun.proxy.jdk.proxy1.$Proxy3 (in module jdk.proxy1) because modul
No,
because the class loader that is usually used is not the module class loader
but one of its parent.
Rémi
- Mail original -
> De: "David M. Lloyd"
> À: jigsaw-dev@openjdk.java.net
> Envoyé: Mardi 8 Décembre 2015 16:05:06
> Objet: Re: Is there really a jdk.
On 08/12/15 16:07, Peter Levart wrote:
>
>> Except now I have to add a read to scan annotations of another module,
>
> Do you really have to addRead() ? Visibility of of classes
> (Class.forName()) should only depend on class loader delegation.
> Enumerating members, when you already have a java.
that a module is a sigle
compilation unit.
Rémi
- Mail original -
> De: "Stephane Epardaud"
> À: jigsaw-dev@openjdk.java.net
> Envoyé: Mardi 8 Décembre 2015 15:59:26
> Objet: Re: Is there really a jdk.proxy1 module?
>
> Actually no, I've found th
On 12/08/2015 03:59 PM, Stephane Epardaud wrote:
Actually no, I've found that insted of accessing the proxy class
directly I should just access the proxied annotation class and it works.
Thanks anyway.
That's right. I was about to ask you about what you are doing to require
access to implem
ardaud"
À: jigsaw-dev@openjdk.java.net
Envoyé: Mardi 8 Décembre 2015 15:21:57
Objet: Is there really a jdk.proxy1 module?
I'm getting:
java.lang.IllegalAccessException: class
com.redhat.ceylon.model.loader.impl.reflect.mirror.ReflectionAnnotation
(in module com.redhat.ceylon.model) can
…
>>>
>>> On 08/12/15 15:32, Remi Forax wrote:
>>>
>>>> No,
>>>> jdk.proxy1 is a module created dynamically by the class
>>>> java.lang.reflect.Proxy.
>>>>
>>>> Rémi
>>>>
>>>> - Mail origina
Actually no, I've found that insted of accessing the proxy class
directly I should just access the proxied annotation class and it works.
Thanks anyway.
Except now I have to add a read to scan annotations of another module,
which naturally introduces a cycle. This can't be right. Suppose I've a
F
net
Envoyé: Mardi 8 Décembre 2015 15:21:57
Objet: Is there really a jdk.proxy1 module?
I'm getting:
java.lang.IllegalAccessException: class
com.redhat.ceylon.model.loader.impl.reflect.mirror.ReflectionAnnotation
(in module com.redhat.ceylon.model) cannot access class
com.sun.proxy.jdk.pro
orax wrote:
No,
jdk.proxy1 is a module created dynamically by the class java.lang.reflect.Proxy.
Rémi
- Mail original -
De: "Stephane Epardaud"
À: jigsaw-dev@openjdk.java.net
Envoyé: Mardi 8 Décembre 2015 15:21:57
Objet: Is there really a jdk.pr
;> À: jigsaw-dev@openjdk.java.net
>> Envoyé: Mardi 8 Décembre 2015 15:21:57
>> Objet: Is there really a jdk.proxy1 module?
>>
>> I'm getting:
>>
>> java.lang.IllegalAccessException: class
>> com.redhat.ceylon.model.loader.impl.reflect.mirror.Reflect
No,
jdk.proxy1 is a module created dynamically by the class java.lang.reflect.Proxy.
Rémi
- Mail original -
> De: "Stephane Epardaud"
> À: jigsaw-dev@openjdk.java.net
> Envoyé: Mardi 8 Décembre 2015 15:21:57
> Objet: Is there really a jdk.proxy1 mo
odule jdk.proxy1
When using reflection to load annotations. Is there really a
"jdk.proxy1" module I need to import when doing reflection? Sounds
fishy, no?
Cheers.
24 matches
Mail list logo