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

Adam Lally closed UIMA-826.
---------------------------

    Resolution: Fixed

Fixed, and test case included.

> Type System Merging does not work consistently when a type is declared twice 
> with different supertypes
> ------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-826
>                 URL: https://issues.apache.org/jira/browse/UIMA-826
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.1
>            Reporter: Adam Lally
>            Assignee: Adam Lally
>             Fix For: 2.2.2
>
>
> When type system merging is done, if the same type is declared twice with 
> different supertypes, then the result depends on the order in which the types 
> are declared.
> For example, given the type system descriptors:
> TS1.xml:
> <typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier";>
> <types>
> <typeDescription>
> <name>Sub</name>
> <description>Example type.</description>
> <supertypeName>uima.tcas.Annotation</supertypeName>
> </typeDescription>
> </types>
> </typeSystemDescription>
> TS2.xml:
> <typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier";>
> <types>
> <typeDescription>
> <name>Sub</name>
> <description>Example type.</description>
> <supertypeName>Super</supertypeName>
> </typeDescription>
> <typeDescription>
> <name>Super</name>
> <description>Example type.</description>
> <supertypeName>uima.tcas.Annotation</supertypeName>
> </typeDescription>
> </types>
> </typeSystemDescription>
> If you merge them in the order TS1.xml, TS2.xml it will fail with the error 
> message:  "The Type Sub is declared twice, with incompatible supertypes Super 
> and uima.tcas.Annotation".  But if you merge them in the order TS2.xml, 
> TS1.xml it will succeed!
> The intended behavior is that the merge should succeed and the resulting 
> supertype should be "Super" (the lower of the two declared supertypes in the 
> type hierarchy).  It is only supposed to fail if the different declared 
> supertypes are not in the same inheritance chain (neither inherits from the 
> other).  But that code is broken in the case where the two subtype 
> declarations are processed before the supertype declarations.

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

Reply via email to