mirror of
https://github.com/apache/lucene.git
synced 2025-02-06 10:08:58 +00:00
remove synchronization in Document: LUCENE-959
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@556693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f55e4057d2
commit
230ecaa169
@ -1,4 +1,4 @@
|
||||
Lucene Change Log
|
||||
¿Lucene Change Log
|
||||
|
||||
$Id$
|
||||
|
||||
@ -56,6 +56,8 @@ Optimizations
|
||||
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
|
||||
|
||||
Build
|
||||
|
@ -38,7 +38,7 @@ import java.util.*; // for javadoc
|
||||
*/
|
||||
|
||||
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 @@ public final class Document implements java.io.Serializable {
|
||||
* @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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user