lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Vector
Date Sat, 06 May 2006 15:55:06 GMT
I think most of Vector (or Hashtable) references are leftovers from the pre-Java Collections
era, that's all.
I doubt we'd be able to get much juice out of move unsynchronized Java Collections, although
I'd like to see them for the same reason as Yonik.

Otis

----- Original Message ----
From: Yonik Seeley <yseeley@gmail.com>
To: java-dev@lucene.apache.org
Sent: Saturday, May 6, 2006 6:35:03 AM
Subject: Re: Vector

On 5/6/06, karl wettin <kalle@snigel.net> wrote:
> There are a couple of Vector:s in the code. Is it really necessary to
> use this expensive thread safe artifact from the dark ages?

I've wondered that myself ... seeing "Vector" in the code does hurt my
eyes a little :-)
It's just one of those things that's never the highest priority I guess.

I think in many/most of these places it's unnecessary to have a
synchronized collection at all.  For examile, the one in Document for
instance will be used often:
  List fields = new Vector();

Since the reference type is actually "List" it looks like the use of a
synchronized collection is deliberate.  Can someone think why this is
needed?

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message