uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: generics cleanup - avoiding modifying public APIs?
Date Fri, 24 Jul 2009 20:59:57 GMT


Marshall Schor wrote:
> Jörn Kottmann wrote:
>   
>> Marshall Schor wrote:
>>     
>>> Jörn Kottmann wrote:
>>>  
>>>       
>>>> Marshall Schor wrote:
>>>>    
>>>>         
>>>>> When adding generic type info to UIMA core, if there is a method which
>>>>> is declared to return a List, and we change it to return a
>>>>> List<ofSomeType>, and the method is part of the UIMA public API
- does
>>>>> that "break" the public API?  Or will code that is already written to
>>>>> use it continue to work?  I think the code would continue to work in
>>>>> terms of the runtime (because of the "erasure" approach), but the
>>>>> compiling may generate some new warnings for our users?
>>>>>         
>>>>>           
>>>> If a user wrote List<SomeOtherType> sample = ....  then its likely
>>>> that he will get a compile error when our code return List<ofSomeType>
>>>> (but not a runtime error I think).
>>>> Same is true for things which are passed to UIMA API methods, if a
>>>> user already
>>>> declared generic types its possible that it will break the code.
>>>>
>>>>    
>>>>         
>>>>> Is this OK or should we refrain from any changes which are the public
>>>>> UIMA api's?
>>>>>         
>>>>>           
>>>> I think it is ok, because its unlikely that we break something.
>>>>
>>>> In the whole UIMA repo was only one case which broke existing code
>>>> and that was the additionalParams map which was in one case passed
>>>> as a Properties object which is Map<Object, Object> and not
>>>> Map<String, Object>.
>>>>     
>>>>         
>>> Does this mean you've already changed everything except for that?  When
>>> I started doing things in the uimaj-core I saw a lot that needed
>>> changing and started changing it. (and I was up to date, too).
>>>   
>>>       
>> First I went through the interfaces and changed these,
>> because thats the place where it must be right. To make
>> sure the changes are ok I attached a patch to the jira issue
>> and ask for review on the mailing list and got a +1 from Thilo,
>> no one else commented. I assumed that it was accepted because
>> no one complained.
>>
>> To further test if the changes are really ok I changed the test classes
>> and later the cas.impl package. That lead to a number of corrections
>> in the interfaces. Yeah there are still around 2000 warnings in the
>> uimaj-core.
>>
>> Should we start a new review of the interface changes ?
>>     
> I think so.  But first, let me revert my changes, where I just sort of
> "jumped in" without realizing you had already done this work but not
> committed it :-).  
After looking at SVN, it seems that most of my changes never got to the
point of being committed (just changed in my workspace), and Jörn has
already started committing his changes here.  So I'll instead be
reviewing things.

-Marshall
> I'll do that over the weekend (at least that's my
> intention :-) ).  Your changes sound like they're probably more
> carefully thought out, too...
>
> -Marshall
>   
>> Jörn
>>
>>
>>     
>
>
>   

Mime
View raw message