[ 
https://issues.apache.org/jira/browse/UIMA-4554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14707529#comment-14707529
 ] 

James Zhu commented on UIMA-4554:
---------------------------------

Thanks, Richard.

To answer your question, "what about types that have 1+ intermediate supertypes 
until "Annotation" is reached", in that case, we only need
@SuppressWarnings("rawtypes").

For those classes that immediately derive from uima.cas.Annotation, they will 
need
@SuppressWarnings({ "rawtypes", "unchecked" }).

I am using "jg.getJavaName(td.getSupertypeName())" following existing code. I 
may change to use td.getSuperTypeName().equals("uima.cas.Annotation") as you 
suggested. I guess Jg.getJavaName() just helps to avoid generating the fully 
qualified name when the package is already imported.

I completely agree with you that the @SuppressWarning("hiding") issue should be 
a separate JIRA issue. Maybe we can revive JIRA-1983 and attach to that?

Please let me know if there anything else I can help with. Thanks.


> JCasGen generating rawType warnings for fsGenerator
> ---------------------------------------------------
>
>                 Key: UIMA-4554
>                 URL: https://issues.apache.org/jira/browse/UIMA-4554
>             Project: UIMA
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 2.8.1SDK
>            Reporter: Marshall Schor
>            Priority: Minor
>             Fix For: 2.8.2SDK
>
>         Attachments: UIMA-4554 patch 2015-08-15 - uimaj-jet-expander.patch, 
> UIMA-4554 patch 2015-08-15.patch, UIMA-4554 patch 2015-08-16.patch, UIMA-4554 
> patch 2015-08-18.patch, uimaj-tools-UIMA-4554-2015-08-11.patch
>
>
> JCasGen generate references to FsGenerator which was changed in 2.8.0 to have 
> generic type information.  So the resulting generated code causes warnings 
> about raw types being used.  Workaround - add a 
> @SuppressWarnings("rawtypes"), but a better thing would be to add the proper 
> generic arguments.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to