uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: [VOTE] uimaj 3.0.3 rc2
Date Thu, 01 Aug 2019 14:24:10 GMT
ouch... 

I tend to agree with you...

Is this easy to "fix" in DkPro ?

-Marshall

On 8/1/2019 6:09 AM, Richard Eckart de Castilho wrote:
> dist artifact signature check: ok
> README spot check: ok
> RELEASE_NOTES spot check: ok
> API report spot check: ok
> Built from sources: ok
>
> Building DKPro Core against the RC, I get a compiler error:
>
> With v3.0.2, JCasGen generated this code:
>
> ```
> public FSArray getAttributes() { return (FSArray)(_getFeatureValueNc(wrapGetIntCatchException(_FH_attributes)));}
> ```
>
> and DKPro Core could/had to then cast the unspecific FSArray to Iterable<FeatureStructure>:
>
> ```
>   for (FeatureStructure attrFS : (Iterable<FeatureStructure>) aElement.getAttributes())
{
>     ...
>   }
> ```
>
> But with v3.0.3, JCasGen was changed to return specific types where possible instead
of an unspecified generic:
>
> ```
>   public FSArray<XmlAttribute> getAttributes() { 
>     return (FSArray<XmlAttribute>)(_getFeatureValueNc(wrapGetIntCatchException(_FH_attributes)));
>   }
> ```
>
> This now causes the previously working type cast in DKPro Core to become a compiler error:
>
> ```
>   [ERROR] /Users/bluefire/git/dkpro-core/dkpro-core-api-xml-asl/src/main/java/org/dkpro/core/api/xml/Cas2SaxEvents.java:[67,95]
incompatible types: org.apache.uima.jcas.cas.FSArray<org.dkpro.core.api.xml.type.XmlAttribute>
cannot be converted to java.lang.Iterable<org.apache.uima.cas.FeatureStructure>
> ```
>
> I'd tend to say that the change to JCasGen is not a source-compatible change and would
warrant changing the version number to 3.1.0.
>
> WDYT?
>
> Cheers,
>
> -- Richard
>
>

Mime
View raw message