You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by yo...@apache.org on 2007/07/16 20:46:59 UTC
svn commit: r556693 - in /lucene/java/trunk: CHANGES.txt
src/java/org/apache/lucene/document/Document.java
Author: yonik
Date: Mon Jul 16 11:46:58 2007
New Revision: 556693
URL: http://svn.apache.org/viewvc?view=rev&rev=556693
Log:
remove synchronization in Document: LUCENE-959
Modified:
lucene/java/trunk/CHANGES.txt
lucene/java/trunk/src/java/org/apache/lucene/document/Document.java
Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=diff&rev=556693&r1=556692&r2=556693
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Mon Jul 16 11:46:58 2007
@@ -1,4 +1,4 @@
-Lucene Change Log
+¿Lucene Change Log
$Id$
@@ -55,6 +55,8 @@
3. LUCENE-892: Fixed extra "buffer to buffer copy" that sometimes
takes place when using compound files. (Mike McCandless)
+
+ 4. LUCENE-959: Remove synchronization in Document (yonik)
Documentation
Modified: lucene/java/trunk/src/java/org/apache/lucene/document/Document.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/Document.java?view=diff&rev=556693&r1=556692&r2=556693
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/Document.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/Document.java Mon Jul 16 11:46:58 2007
@@ -38,7 +38,7 @@
*/
public final class Document implements java.io.Serializable {
- List fields = new Vector();
+ List fields = new ArrayList();
private float boost = 1.0f;
/** Constructs a new document with no fields. */
@@ -173,7 +173,15 @@
* @deprecated use {@link #getFields()} instead
*/
public final Enumeration fields() {
- return ((Vector)fields).elements();
+ return new Enumeration() {
+ final Iterator iter = fields.iterator();
+ public boolean hasMoreElements() {
+ return iter.hasNext();
+ }
+ public Object nextElement() {
+ return iter.next();
+ }
+ };
}
/** Returns a List of all the fields in a document.