[
https://issues.apache.org/jira/browse/UIMA-6054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16858851#comment-16858851
]
Hai-Son Nguyen commented on UIMA-6054:
--------------------------------------
I believe in your scenario when the user updates to v3 the TTTSSS class will
start to have the deprecated warning and regenerating TTT class will not change
that but the TTTSSS implementation will stymie the warning from propagating to
TTT.
The users would need to regenerate TTTSSS then to remove the warning on it.
Just tested with 3 simple classes as you mentioned. The warning won't leak into
the TTT subclass.
I think it may be a better discussion now we're discussing it is the goal of
deprecating the original constructors and if we need to then notify users to
migrate away from using these. An alternate approach if we want to clue in
users to start moving away from a deprecated feature that may disappear is to
propagate the Deprecated annotation. The hasDeprecatedDefaultConstructor()
should then be extended to find base UIMA type being inherited from? Or do you
think we could use something like:
Type currentType = Jg.typeSystem.getType(currentTypeName)
Type topType = Jg.typeSystem.getTopType()
return *!*Jg.typeSystem.subsumes(currentType, topType)
> 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)