You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Benson Margulies <bi...@gmail.com> on 2009/05/29 14:11:06 UTC

warnings

Can I interest you in a patch to zero out the eclipse 3.4 warning count?
This would involve deleting some unused variables, removing some
unnecesssary @SuppressWarning's, and in one case (ClassParameter) adding an
@SupressWarning, since I can't for the life me figure out how to make that
into

class ClassParameter extends AbstractParameter<Class<?>>.

Re: warnings

Posted by Sean Owen <sr...@gmail.com>.
"?" and "? extends Object" should be equivalent and yeah nothing seems
to work for any value of mumble.

On Fri, May 29, 2009 at 8:36 PM, Ted Dunning <te...@gmail.com> wrote:
> Probably needs Class<? extends mumble>

Re: warnings

Posted by Benson Margulies <bi...@gmail.com>.
if it is Class<?>, we need then an instance of Class<Class<?>> and I  
don't know how to get one.

On May 29, 2009, at 3:36 PM, Ted Dunning <te...@gmail.com> wrote:

> Probably needs Class<? extends mumble>
>
> WHat mumble should be is tricky to say without looking at the code.   
> Object
> is a candidate.
>
> On Fri, May 29, 2009 at 6:16 AM, Sean Owen <sr...@gmail.com> wrote:
>
>> Anyway, yeah if you make the type parameter Class<?>, then it
>> complains that, essentially, Class.class is not of this type, which
>> doesn't make sense to me.
>>

Re: warnings

Posted by Ted Dunning <te...@gmail.com>.
Probably needs Class<? extends mumble>

WHat mumble should be is tricky to say without looking at the code.  Object
is a candidate.

On Fri, May 29, 2009 at 6:16 AM, Sean Owen <sr...@gmail.com> wrote:

> Anyway, yeah if you make the type parameter Class<?>, then it
> complains that, essentially, Class.class is not of this type, which
> doesn't make sense to me.
>

Re: warnings

Posted by Sean Owen <sr...@gmail.com>.
Ah right. I am not sure why I don't see a warning on that anymore in IntelliJ 9.

Anyway, yeah if you make the type parameter Class<?>, then it
complains that, essentially, Class.class is not of this type, which
doesn't make sense to me.

I agree, it is worth @SuppressWarnings. Send over your patch and I can commit.

On Fri, May 29, 2009 at 2:09 PM, Benson Margulies <bi...@gmail.com> wrote:
> Eclipse always warns for a naked use of Class. So, Eclipse thinks, more or
> less, that any time you might want to say X<Class>, that you really meant to
> say X<Class<?>>, or X<Class<something>>, which is in some cases the same
> sort of beast. However, this is not one of those cases. I think that an
> @SuppressWarnings is called for.

Re: warnings

Posted by Benson Margulies <bi...@gmail.com>.
Eclipse always warns for a naked use of Class. So, Eclipse thinks, more or
less, that any time you might want to say X<Class>, that you really meant to
say X<Class<?>>, or X<Class<something>>, which is in some cases the same
sort of beast. However, this is not one of those cases. I think that an
@SuppressWarnings is called for.

On Fri, May 29, 2009 at 8:51 AM, Sean Owen <sr...@gmail.com> wrote:

> I don't think so... that class doesn't need a new parameter. It is an
> AbstractParameter, parameterized by Class, already.
>
> Actually, I opened this up again in IntelliJ and no longer see the
> unchecked-cast sort of warnings I remember on this code. I certainly
> recall something like that here.
>
> What's the error you're getting again?
>
> On Fri, May 29, 2009 at 1:33 PM, Benson Margulies <bi...@gmail.com>
> wrote:
> > Should that class really be ClassParameter<T> instead of just
> > ClassParameter?
>

Re: warnings

Posted by Sean Owen <sr...@gmail.com>.
I don't think so... that class doesn't need a new parameter. It is an
AbstractParameter, parameterized by Class, already.

Actually, I opened this up again in IntelliJ and no longer see the
unchecked-cast sort of warnings I remember on this code. I certainly
recall something like that here.

What's the error you're getting again?

On Fri, May 29, 2009 at 1:33 PM, Benson Margulies <bi...@gmail.com> wrote:
> Should that class really be ClassParameter<T> instead of just
> ClassParameter?

Re: warnings

Posted by Benson Margulies <bi...@gmail.com>.
Should that class really be ClassParameter<T> instead of just
ClassParameter?

On Fri, May 29, 2009 at 8:13 AM, Sean Owen <sr...@gmail.com> wrote:

> I personally would be very into it. I use IntelliJ and yeah it yells
> about a whole lot of the same stuff every time I open a file.
>
> I also cannot figure out what to do with that Class<?> line!
>
> On Fri, May 29, 2009 at 1:11 PM, Benson Margulies <bi...@gmail.com>
> wrote:
> > Can I interest you in a patch to zero out the eclipse 3.4 warning count?
> > This would involve deleting some unused variables, removing some
> > unnecesssary @SuppressWarning's, and in one case (ClassParameter) adding
> an
> > @SupressWarning, since I can't for the life me figure out how to make
> that
> > into
> >
> > class ClassParameter extends AbstractParameter<Class<?>>.
> >
>

Re: warnings

Posted by Sean Owen <sr...@gmail.com>.
I personally would be very into it. I use IntelliJ and yeah it yells
about a whole lot of the same stuff every time I open a file.

I also cannot figure out what to do with that Class<?> line!

On Fri, May 29, 2009 at 1:11 PM, Benson Margulies <bi...@gmail.com> wrote:
> Can I interest you in a patch to zero out the eclipse 3.4 warning count?
> This would involve deleting some unused variables, removing some
> unnecesssary @SuppressWarning's, and in one case (ClassParameter) adding an
> @SupressWarning, since I can't for the life me figure out how to make that
> into
>
> class ClassParameter extends AbstractParameter<Class<?>>.
>