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

Hai-Son Nguyen commented on UIMA-6054:
--------------------------------------

Thanks for the info, I went back and looked at a new TypeSystem descriptor file 
and can see the additional types that would generate warnings.

This patch creates a method on Jg: boolean 
hasDeprecatedDefaultConstructor(String superTypeName) to determine if the 
suppress warning annotation should be added.

Currently defines these as needing the annotation: 

Annotation, AnnotationBase, DocumentAnnotation

TOP does not need it and ListBase should be used so won't have it as well.

Since subclasses of other classes will use the constructor from their 
superclass I don't believe the deprecated warning won't propagate pass these 
initial subclasses.

 

> JCasGen generating warnings by creating deprecated constructors
> ---------------------------------------------------------------
>
>                 Key: UIMA-6054
>                 URL: https://issues.apache.org/jira/browse/UIMA-6054
>             Project: UIMA
>          Issue Type: Bug
>          Components: UIMA
>    Affects Versions: 3.0.2SDK
>            Reporter: Hai-Son Nguyen
>            Priority: Trivial
>         Attachments: patch-uima-6054v1.txt, patch-uima-6054v2.txt, 
> patch-uima-6054v3.txt
>
>
> The JCasGen process produces classes with a protected empty no parameter 
> constructor.
> Base classes that have extended the Annotation class 
> (org.apache.uima.jcas.tcas.Annotation) are now getting warnings that the 
> constructor Annotation() is deprecated.
> The constructor documentation states, "Never called. Disable default 
> constructor" but the presence of other constructors already serve this 
> purpose. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to