LUCENE-1654: Fix UOE with old-style user-data indexes.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@779686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-05-28 17:30:56 +00:00
parent 54fa7be67b
commit 5f6d0c7bd6
1 changed files with 2 additions and 3 deletions

View File

@ -261,11 +261,10 @@ final class SegmentInfos extends Vector {
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;