[
https://issues.apache.org/jira/browse/UIMA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977607#action_12977607
]
Philip Ogren commented on UIMA-1983:
------------------------------------
If I define a type called MyAnnotation in a type system descriptor file, then
MyAnnotation.java and MyAnnotation_Type.java can be generated.
The following can be compiler warnings in Java 1.5:
MyAnnotation.java:
- The field MyAnnotation.typeIndexID is hiding a field from type Annotation
- The field MyAnnotation.type is hiding a field from type Annotation
Both of these can be ignored with "@SuppressWarnings("hiding")"
MyAnnotation_Type.java:
- The field MyAnnotation_Type.featOkTst is hiding a field from type
Annotation_Type
- The field MyAnnotation_Type.typeIndexID is hiding a field from type
Annotation_Type
Both of these can be ignored with "@SuppressWarnings("hiding")"
When compiling with Java 1.6, I get the following additional warnings:
org.uimafit.type.MyAnnotation.readObject() - Empty block should be documented
This one can be fixed by simply adding a comment to the code block such as
"/*generated code */"
org.uimafit.type.AnalyzedText.getTypeIndexID() - The method getTypeIndexID() of
type AnalyzedText should be tagged with @Override since it actually overrides a
superclass method
This one can be fixed by adding the "@Override" annotation.
org.uimafit.type.AnalyzedText_Type.getFSGenerator() - The method
getFSGenerator() of type AnalyzedText_Type should be tagged with @Override
since it actually overrides a superclass method
This one can be fixed by adding the "@Override" annotation.
It may be possible that there are other compiler warnings - but this is what I
see with my current configuration which is fairly standard, I think.
Thanks.
> JCasGen prouces source files with name shadowing/conflicts
> ----------------------------------------------------------
>
> Key: UIMA-1983
> URL: https://issues.apache.org/jira/browse/UIMA-1983
> Project: UIMA
> Issue Type: Improvement
> Components: Core Java Framework
> Reporter: Philip Ogren
> Priority: Minor
>
> When the compiler warnings are set to complain when name shadowing or name
> conflicts exist, then the source files produced by JCasGen contain many
> warnings. It sure would be nice if these files came out pristine rather than
> having compiler warnings. Eclipse does not seem to allow for fine grained
> compiler warning configuration (i.e. to ignore certain warnings for certain
> source folders or packages) but only works at the project level.
> Therefore, I must either turn these warnings off for the entire project or
> must ignore the warnings in the type system java files.
> I'm guessing that this is a side effect of an intentional design decision (re
> eg typeIndexID) and so I am not that hopeful that this can be fixed but
> thought I would ask anyways.
> Thanks,
> Philip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.