From d71d1aa941373fa08ee698df3c1719a10a68be35 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 22 Jan 2016 15:17:17 +0000 Subject: [PATCH] woops git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1726228 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/store/NIOFSDirectory.java | 6 +----- .../test/org/apache/lucene/util/BaseGeoPointTestCase.java | 6 ++---- .../compressing/TestCompressingTermVectorsFormat.java | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java b/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java index b7392904fd1..84f1a7ff899 100644 --- a/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java +++ b/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java @@ -192,10 +192,6 @@ public class NIOFSDirectory extends FSDirectory { } @Override - protected void seekInternal(long pos) throws IOException { - if (pos > length()) { - throw new EOFException("read past EOF: pos=" + pos + " vs length=" + length() + ": " + this); - } - } + protected void seekInternal(long pos) throws IOException {} } } diff --git a/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java b/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java index 4236e88be6b..f84d696b6c3 100644 --- a/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java +++ b/lucene/sandbox/src/test/org/apache/lucene/util/BaseGeoPointTestCase.java @@ -434,8 +434,7 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase { } else { result = -90 + 180.0 * random().nextDouble(); } - // TODO: we should not do this here! it weakens the test, and users don't pre-quantize the lat/lons they send us: - return unscaleLat(scaleLat(result)); + return result; } public double randomLon(boolean small) { @@ -445,8 +444,7 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase { } else { result = -180 + 360.0 * random().nextDouble(); } - // TODO: we should not do this here! it weakens the test, and users don't pre-quantize the lat/lons they send us: - return unscaleLon(scaleLon(result)); + return result; } protected GeoRect randomRect(boolean small, boolean canCrossDateLine) { diff --git a/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java b/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java index cde93db1b7e..7cfbe21a6f2 100644 --- a/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java +++ b/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java @@ -93,7 +93,7 @@ public class TestCompressingTermVectorsFormat extends BaseTermVectorsFormatTestC // by this test. iwConf.setCodec(CompressingCodec.randomInstance(random(), 4*1024, 100, false, 8)); IndexWriter iw = new IndexWriter(dir, iwConf); - DirectoryReader ir = DirectoryReader.open(iw); + DirectoryReader ir = DirectoryReader.open(iw, true); for (int i = 0; i < 5; i++) { Document doc = new Document(); FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);