lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r779686 - /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java
Date Thu, 28 May 2009 17:30:57 GMT
Author: uschindler
Date: Thu May 28 17:30:56 2009
New Revision: 779686

URL: http://svn.apache.org/viewvc?rev=779686&view=rev
Log:
LUCENE-1654: Fix UOE with old-style user-data indexes.

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java?rev=779686&r1=779685&r2=779686&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java Thu May 28 17:30:56
2009
@@ -261,11 +261,10 @@
       if (format <= FORMAT_USER_DATA) {
         if (format <= FORMAT_DIAGNOSTICS) {
           userData = input.readStringStringMap();
+        } else if (0 != input.readByte()) {
+          userData = Collections.singletonMap("userData", input.readString());
         } else {
           userData = Collections.EMPTY_MAP;
-          if (0 != input.readByte()) {
-            userData.put("userData", input.readString());
-          }
         }
       } else {
         userData = Collections.EMPTY_MAP;



Mime
View raw message