lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r770842 - /lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/FieldInfos.java
Date Fri, 01 May 2009 22:13:22 GMT
Author: mikemccand
Date: Fri May  1 22:13:22 2009
New Revision: 770842

URL: http://svn.apache.org/viewvc?rev=770842&view=rev
Log:
LUCENE-1623: use .clear() instead of creating new ArrayList/HashMap

Modified:
    lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/FieldInfos.java

Modified: lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/FieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/FieldInfos.java?rev=770842&r1=770841&r2=770842&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/FieldInfos.java (original)
+++ lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/index/FieldInfos.java Fri May
 1 22:13:22 2009
@@ -42,8 +42,8 @@
   static final byte STORE_PAYLOADS = 0x20;
   static final byte OMIT_TF = 0x40;
   
-  private ArrayList byNumber = new ArrayList();
-  private HashMap byName = new HashMap();
+  private final ArrayList byNumber = new ArrayList();
+  private final HashMap byName = new HashMap();
 
   FieldInfos() { }
 
@@ -65,8 +65,8 @@
         // pre-utf8
         input.seek(0);
         input.setModifiedUTF8StringsMode();
-        byNumber = new ArrayList();
-        byName = new HashMap();
+        byNumber.clear();
+        byName.clear();
         try {
           read(input, name);
         } catch (Throwable t) {



Mime
View raw message