I think this is historically. I have seen this in my big 3.0 generification patches, too. But I did not wanted to change it as Vector has other allocation schema than ArrayList. But maybe we should simply change it, it’s a package-private class, right?


But in general subclassing those implementations is not the best thing you can do. In general the class should extend Object or something else and just have final field of type List<…>. Exposing the whole API of List to the outside is bad.


+1 to refactor this class (and don’t let it extend a Collections class).



Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen


eMail: uwe@thetaphi.de


From: Shai Erera [mailto:serera@gmail.com]
Sent: Sunday, February 28, 2010 12:33 PM
To: java-dev@lucene.apache.org
Subject: SegmentInfos extends Vector



What's the reason SegmentInfos extends Vector rather than say ArrayList? Do we need the synchronization around it which Vector provides?