[weld-dev] non-visable classes and constructors
Mark Struberg
struberg at yahoo.de
Mon Nov 30 10:27:22 EST 2009
Gavin,
there are 2 sides to look at. One could also argue:
Exactly _because_ the spec doesn't mention something, the _default_ Java behaviour should be used. Which means that a package scoped class must NOT be injected into a class of another package!
Currently the TCK forces us to ct.setAccessible(true), so all constructors (even private ones) get injected. I don't think this is the desired behaviour, is it?
LieGrue,
strub
--- Gavin King <gavin.king at gmail.com> schrieb am Mo, 30.11.2009:
> Von: Gavin King <gavin.king at gmail.com>
> Betreff: Re: [weld-dev] non-visable classes and constructors
> An: "Pete Muir" <pmuir at redhat.com>
> CC: "Mark Struberg" <struberg at yahoo.de>, "Weld-Dev" <weld-dev at lists.jboss.org>
> Datum: Montag, 30. November 2009, 16:04
> Huh? The spec does not in any way
> limit the visibility of the bean constructor. So any
> visibility must be supported!
>
> Sent from my iPhone
>
> On Nov 30, 2009, at 6:21 AM, Pete Muir <pmuir at redhat.com>
> wrote:
>
> > Yes, the spec makes no statements here I know of. I
> don't think the TCK should restrict the impl like that
> anyway, so please file a CDKTCK issue (and say the FQCN, as
> there are multiple classes called MissileInterceptor).
> >
> > Thanks!
> >
> > On 30 Nov 2009, at 09:13, Mark Struberg wrote:
> >
> >> Gavin,
> >>
> >> The spec imho says nothing about the visibility of
> constructors (e.g. in 3.1.1. and others).
> >> But the TCK sometimes assumes that even package
> scoped classes (e.g. MissileInterceptor) which can _not_ be
> constructed with new must be injected. This feels a bit
> unnatural to me since there may be a very good reason to
> hide e.g. private constructors or even whole classes.
> >>
> >> Have I overseen something in the spec or do we
> need to clarify some parts?
> >>
> >> Txs and LieGrue,
> >> strub
> >>
> >>
> __________________________________________________
> >> Do You Yahoo!?
> >> Sie sind Spam leid? Yahoo! Mail verfügt über
> einen herausragenden Schutz gegen Massenmails.
> >> http://mail.yahoo.com
> >>
> >> _______________________________________________
> >> weld-dev mailing list
> >> weld-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/weld-dev
> >
> >
> > _______________________________________________
> > weld-dev mailing list
> > weld-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/weld-dev
>
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
More information about the weld-dev
mailing list