Jörn Kottmann wrote: > Thilo Goetz wrote: >> Jörn Kottmann wrote: >> >>> Thilo Goetz wrote: >>> >>>> Jörn Kottmann wrote: >>>> >>>> >>>>> This methods calls Collections.binarySearch. >>>>> >>>>> I doubt that the call is correct since binarySearch >>>>> assumes that the passed objects are Comparable which >>>>> FeatureStructure is not. >>>>> I have seen similar code in Subiterator.moveTo where I think its >>>>> correct. >>>>> >>>>> Are UnambiguousIteratorImpl and Subiterator only made for AnnotationFS >>>>> objects ? >>>>> >>>> Yes. Does that make it correct? >>>> >>> No, Subiterator calls a different binarySearch method which takes >>> a Comparator. We should then do the same in UnambiguousIteratorImpl. >>> Is there a test for this iterator ? For me it looks like that the moveTo >>> method >>> is broken. >>> >>> Jörn >>> >> >> I'll check, but I may not get to it till tomorrow. >> > > Did you check it ? Would like to get it fixed so I can continue to work > on generics in the cas.impl package. > > > Jörn
You are quite right, UnambiguousIteratorImpl needs to do the same as Subiterator. I'll fix it right now. --Thilo
