i think something similar happend to me with Model.valueOf(Map), so
i had to change it back to return Model instead of Model<?>

  Gerolf

On Wed, May 14, 2008 at 11:41 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> well, apparently johan ran into a situation where component<?> is too
> restrictive...
>
> -igor
>
>
> On Wed, May 14, 2008 at 2:37 PM, Sebastiaan van Erk <[EMAIL PROTECTED]>
> wrote:
> > Igor Vaynberg wrote:
> >>
> >> since then the thread has evolved into whether or not we should use <?
> >> extends Component> or <? extends Component<?>>
> >>
> >> -igor
> >
> > I don't understand how that changes any of my points. The first is
> incorrect
> > (from a generics point of view) since you're referencing an
> unparameterized
> > generic type.
> >
> > So the second gives warnings only in code that is not properly
> generified...
> >
> > Regards,
> > Sebastiaan
> >
> >
> >>
> >> On Wed, May 14, 2008 at 1:54 PM, Sebastiaan van Erk <
> [EMAIL PROTECTED]>
> >> wrote:
> >>>
> >>> Igor Vaynberg wrote:
> >>>
> >>>> i do like generics. did i ever say otherwise? the problem here is that
> >>>> if we scope something as Class<? extends Component> then even though
> >>>> you ARE using generics in your code you will still get a warning
> >>>> because we did not scope the class as Class<? extends Component<?>>.
> >>>>
> >>>> on the other hand if we do scope it as Class<? extends Component<?>>
> >>>> then you can no longer pass a raw reference when calling the function.
> >>>
> >>> But that's exactly the point isn't it? If you're using generics then
> you
> >>> shouldn't be using raw Components anymore...
> >>>
> >>>> so we are screwed if we do and we are screwed if we dont, i expected
> >>>> generics to be better.
> >>>
> >>> Well they definitely could have been better (erasure is terrible if you
> >>> ask
> >>> me), but I don't see what's wrong in this case. It warns you if you
> >>> should
> >>> be using a parameterized type but you don't.
> >>>
> >>>>> And especially if you look at the vote result, I think the majority
> >>>>> wants
> >>>>> the generics...
> >>>>
> >>>> that vote was before we uncovered this issue. we voted on the idea of
> >>>> generics, not on the implementation.
> >>>
> >>> That's true, but I wonder if this issue would change the vote much. I
> >>> don't
> >>> really understand why it's an issue, because you can use generified
> >>> Components always: Component<Object> if you don't want to constrain the
> >>> model object, and Component<Void> if you don't need a model.
> >>>
> >>> The question that started the thread was about StringResourceModel
> which
> >>> was
> >>> not yet generified, and in that case, the warning seems to me to be
> >>> perfectly ok: it just says StringResourceModel should be generified.
> It's
> >>> not a release yet, so that some users who use the current snapshot run
> >>> into
> >>> these kind of warnings which cannot be removed seems to be fine to
> me...
> >>>
> >>> Regards,
> >>> Sebastiaan
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to