It may contain list as a field instead. And have a much cleaner API as a consequence.
I agree, I dont like subclassing ArrayList (this is the only class in Lucene that subclasses java collection classes left over. We should rmeove.
Problem: List access is heavy used in code, I have to first review all places. Alternatively we could make ist simply implement List<SegmentInfo>, so it does not get the extra methods from ArrayList that go beyond List. This would be a good way in the middle.
On another note, I wonder, is the fact that Vector is internally synchronized used somewhere within SegmentInfos client code?
Thats safe, synchronization is not an issue here, all access to SegmentInfos is protected by IndexWriter synchronization (see e.g. mergeInit()). The use of Vector is just a relict from earlier days. I should have removed that for 3.0 already but missed that exactly because I did not know if synchronization was needed.