Apache Solr open-source search software
LUCENE-5621: revert: the bug is not mine
Robert Muirf548fdc1e9a5
diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.java b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.javaindex d33ccc2f50f..ab1009a5175 100644--- a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.java+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectPostingsFormat.java@@ -383,7 +383,6 @@ public final class DirectPostingsFormat extends PostingsFormat {final byte[] payloads;if (hasPayloads) {- ros.flush();payloads = new byte[(int) ros.getFilePointer()];ros.writeTo(payloads, 0);} else {diff --git a/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java b/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.javaindex adcdc14b353..0a56508ed3d 100644--- a/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java+++ b/lucene/core/src/java/org/apache/lucene/store/RAMOutputStream.java@@ -155,9 +155,7 @@ public class RAMOutputStream extends IndexOutput {}/** Forces any buffered output to be written. */- // TODO: remove 'public'. Something bogus is happening between this guy and DirectPF,- // not sure which one (or maybe both?) has the bug.- public void flush() throws IOException {+ protected void flush() throws IOException {setFileLength();}