You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2012/07/10 22:19:07 UTC
svn commit: r1359885 -
/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
Author: jpountz
Date: Tue Jul 10 20:19:07 2012
New Revision: 1359885
URL: http://svn.apache.org/viewvc?rev=1359885&view=rev
Log:
Fix error-prone header check (merged from r1359861).
Modified:
lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java?rev=1359885&r1=1359884&r2=1359885&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java Tue Jul 10 20:19:07 2012
@@ -585,7 +585,7 @@ public class PackedInts {
* @lucene.internal
*/
public static Reader getReader(DataInput in) throws IOException {
- final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_START);
+ final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_CURRENT);
final int bitsPerValue = in.readVInt();
assert bitsPerValue > 0 && bitsPerValue <= 64: "bitsPerValue=" + bitsPerValue;
final int valueCount = in.readVInt();
@@ -625,7 +625,7 @@ public class PackedInts {
* @lucene.internal
*/
public static ReaderIterator getReaderIterator(DataInput in, int mem) throws IOException {
- final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_START);
+ final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_CURRENT);
final int bitsPerValue = in.readVInt();
assert bitsPerValue > 0 && bitsPerValue <= 64: "bitsPerValue=" + bitsPerValue;
final int valueCount = in.readVInt();
@@ -677,7 +677,7 @@ public class PackedInts {
* @lucene.internal
*/
public static Reader getDirectReader(IndexInput in) throws IOException {
- final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_START);
+ final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_CURRENT);
final int bitsPerValue = in.readVInt();
assert bitsPerValue > 0 && bitsPerValue <= 64: "bitsPerValue=" + bitsPerValue;
final int valueCount = in.readVInt();