Adam Lally (JIRA | 1 May 21:57
Picon
Favicon

[jira] Closed: (UIMA-389) AnnotationBase.getSofa() throws ClassCastException


     [
https://issues.apache.org/jira/browse/UIMA-389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Lally closed UIMA-389.
---------------------------

    Resolution: Fixed

> AnnotationBase.getSofa() throws ClassCastException
> --------------------------------------------------
>
>                 Key: UIMA-389
>                 URL: https://issues.apache.org/jira/browse/UIMA-389
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>            Reporter: Adam Lally
>         Assigned To: Adam Lally
>             Fix For: 2.2
>
>
> In the JCAS cover class for AnnotationBase:
>   public SofaFS getSofa() {
>     if (AnnotationBase_Type.featOkTst && ((AnnotationBase_Type) jcasType).casFeat_sofa == null)
>       this.jcasType.jcas.throwFeatMissing("sofa", "uima.tcas.Annotation");
>     return (SofaFS) jcasType.ll_cas.ll_getFSForRef(addr);
>   }
> That last line isn't right... it should be calling getFSForRef on the value of the "sofa" feature, but
instead it is calling it on the addr field, which would be the address of the annotation.  

--

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Gmane