lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r556693 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/document/Document.java
Date Mon, 16 Jul 2007 18:46:59 GMT
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.



Mime
View raw message