Thank you so much for the reply, Marshall.

While you are at it, here is another type of similar warnings we have been
living with since upgrade to 2.4.2. Can you please include them in your
Jira issue?

*Description Resource Path Location Type*
*Unnecessary @SuppressWarnings("hiding") AAA.java
/NQUIRY_COMMON/src/org/kp/nlp/types/clinical line 22 Java Problem*

They all occur in JCasGen generated Java classes at the very first few
lines, for instance,


  /** @generated

   * @ordered

   */

  @SuppressWarnings ("hiding")

  public final static int typeIndexID = JCasRegistry.register(AAA.class);

  /** @generated

   * @ordered

   */

  @SuppressWarnings ("hiding")

  public final static int type = typeIndexID;


Thanks a lot!

On Tue, Aug 11, 2015 at 1:30 PM, Marshall Schor <[email protected]> wrote:

> Hi James,
>
> This is a consequence of a change we did to add more generic typing.  We
> didn't
> notice that this warning started appearing.
>
> You can certainly fix it by manually editing the generated JCas files; I
> realize
> that might be annoying.  One kind "bulk" editing would be to add a line,
> right
> before the line in the xxx_Type.java files, which reads:
>     private final FSGenerator fsGenerator =
> of
>     @SuppressWarnings("rawtypes")
>
> So the file would read:
> ...
>   /** @generated */
>   @SuppressWarnings("rawtypes")
>   private final FSGenerator fsGenerator =
> ...
>
>
> I'll put in a Jira to improve the JCasGen to generate these files with the
> right
> generic info added.
>
> Sorry about this!
>
> -Marshall
>
> On 8/11/2015 2:18 PM, James Jichun Zhu wrote:
> > Hi, all:
> >
> > We are considering upgrade to the latest UIMA 2.8.0 release. One thing we
> > immediately noticed was that the Java classes generated from our type
> > system using JCasGen now exhibit the following warnings:
> >
> > *FSGenerator is a raw type. References to generic type FSGenerator<T>
> > should be parameterized AAA_Type.java*
> >
> > Do we have to do something differently to avoid such warnings? We prefer
> > not to suppress such warnings, because in our own code we advocate to
> > always parameterize the types if applicable.
> >
> > Any advice would be appreciated.
> >
> > Thanks!
> >
> >
>
>


-- 
James

Reply via email to