You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Adam Lally <al...@alum.rpi.edu> on 2006/11/20 15:58:40 UTC

Complier Warnings (was Re: Code Conventions are up on our podling website)

On 11/19/06, Thilo Goetz <tw...@gmx.de> wrote:
> I have posted our proposal here:
> http://cwiki.apache.org/confluence/display/UIMA/Eclipse+Compiler+Settings
>
> If you turn these on, the UIMA source code lights up like a Christmas
> tree ;-)

I agree to give all these a try except for "unqualified access to an
instance field".  (I don't want the Christmas tree to catch fire. :)

About deprecation warnings, there are currently quite a lot of these
that result from references to our own deprecated methods/classes, and
these seem unavoidable.  For example CasInitializer is deprecated, but
as long as we still support it, we need to have references to it from
other places in the framework code.  I guess this is just something we
have to live with.  I'm not saying we should turn this warning off
(I've always left it on myself), but it might be worth a note in the
document.

Also I think we should keep these as "recommendations" for now, and
maybe leave them on the Wiki rather than making them more prominent on
the webpage.  We can revisit that later if we think there is a need.
But for now I don't want it to appear that we're setting the bar too
high for new contributors.  And also we don't want to assume that
everyone's using Eclipse.

-Adam

Re: Complier Warnings (was Re: Code Conventions are up on our podling website)

Posted by Adam Lally <al...@alum.rpi.edu>.
> I spent about an hour trying to fix warnings in uimaj-core.  I'm now
> not so happy with having the following warnings turned on:
>
Another one I turned off:  Unnecessary definition of thrown checked
exception.  This is another warning that flags public/protected
methods intended to be overridden in subclasses, and for which there's
no direct way to fix it.

-Adam

Re: Complier Warnings (was Re: Code Conventions are up on our podling website)

Posted by Adam Lally <al...@alum.rpi.edu>.
> On 11/19/06, Thilo Goetz <tw...@gmx.de> wrote:
> > I have posted our proposal here:
> > http://cwiki.apache.org/confluence/display/UIMA/Eclipse+Compiler+Settings
> >
> > If you turn these on, the UIMA source code lights up like a Christmas
> > tree ;-)
>

I spent about an hour trying to fix warnings in uimaj-core.  I'm now
not so happy with having the following warnings turned on:

Undocumented empty block:  There are literally over 1,000 of these
just in uimaj-core/src/main/java.  After documenting the first 20 or
so I ran out of patience.  Most are just empty methods needed to
implement interfaces or provided so that they can be overridden by
subclasses.  Unless somebody's volunteering to document all these, I
think this warning needs to be turned off.

Parameter is never read:  There are a few hunder of these.  Most flag
public/protected methods that are overridden in subclasses (where the
subclass may have a use for the parameter), which  happens quite a lot
in UIMA.  There's generally no easy way to resolve this kind of
problem.  I could see this warning if it were restricted to private
methods only.  As it is, I think it's too restrictive.


I'm still not sure what I think about "Field Declaration hides another
field".  I'm going to try to live with that for now, because it has
found some things that deserve to be cleaned up.  The main source of
noise here is JCas-generated types, which have static public fields
(type, typeIndexId) which hide the same-named fields on supertypes.

-Adam