uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hai-Son Nguyen (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-6056) JCasGen for producing FSArray is a raw type warning
Date Tue, 04 Jun 2019 22:44:00 GMT

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

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

Took a look at the code and wasn't sure how to proceed. I see the root cause is the FeatureStructureImplC
methods are using TOP or FeatureStructure and not able to return properly casted object. 
So I tried to reduce the problem to unchecked casts and added those warnings as appropriate.

Added a layer to access the rangeType to use in generating classes in the Jg classes and redirected
calls to getJavaRangeType() to the new method. This added in the generics to the body of the
methods.

In the method signatures, I added the generic to the signatures as needed and then added warnings
for all FSArray methods and FSList (but only when the generic is unknown "?").

 

> JCasGen for producing FSArray is a raw type warning
> ---------------------------------------------------
>
>                 Key: UIMA-6056
>                 URL: https://issues.apache.org/jira/browse/UIMA-6056
>             Project: UIMA
>          Issue Type: Bug
>          Components: UIMA
>    Affects Versions: 3.0.2SDK
>            Reporter: Hai-Son Nguyen
>            Priority: Minor
>         Attachments: patch-uima-6056v1.txt
>
>
> With the conversion of FSArray into Generic FSArray<> the JCasGen process does
not handle the Generic type properly and will cause extensive warnings in application code.
> The 4 methods generating warnings are:
> xXXX - Feature name, Generic - generic type
>  * *public* FSArray getXXX() { *...* }
>  * *public* *void* setXXX(FSArray v) \{ ... }    
>  * *public* Generic getXXX(*int* i) \{ ... }
>  * *public* *void* setXXX(*int* i, Generic v) \{ ... }



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

Mime
View raw message