[
https://issues.apache.org/jira/browse/UIMA-6054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16857899#comment-16857899
]
Hai-Son Nguyen commented on UIMA-6054:
--------------------------------------
Yes, I can see where a subtype class may have problems if this default
constructor is missing. In my use case, we have base classes that extend off of
Annotation and see this warning only on immediate subclasses of Annotation.
This patch is extracting the superclass for the class being generated and using
it to determine the need for the SupressWarning ("Annotation".equals(supertype))
I also looked at the Component Descriptor Editor UI and it requires a SuperType
and not sure if one can produce a class not originally extended from
uima.tcas.Annotation. If this is the case, the deprecated constructor is
inherited and available for all subclasses and defining it in each class is
redundant.
> 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
>
>
> 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)