Apache Lucene open-source search software
Make contrib/db and contrib/memory compile with changes from LUCENE-755
Michael Buschb9edb2867f66
diff --git a/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java b/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.javaindex b1de7ae0a67..d7027dc9aef 100644--- a/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java+++ b/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java@@ -90,9 +90,8 @@ public class JEIndexOutput extends IndexOutput {length = position;}- public void writeBytes(byte[] b, int len) throws IOException {+ public void writeBytes(byte[] b, int offset, int len) throws IOException {int blockPos = (int) (position & BLOCK_MASK);- int offset = 0;while (blockPos + len >= BLOCK_LEN) {int blockLen = BLOCK_LEN - blockPos;diff --git a/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java b/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.javaindex 61c15ca01c2..ef4dc0cde51 100644--- a/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java+++ b/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java@@ -91,11 +91,10 @@ public class DbIndexOutput extends IndexOutput {length = position;}- public void writeBytes(byte[] b, int len)+ public void writeBytes(byte[] b, int offset, int len)throws IOException{int blockPos = (int) (position & BLOCK_MASK);- int offset = 0;while (blockPos + len >= BLOCK_LEN) {int blockLen = BLOCK_LEN - blockPos;diff --git a/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java b/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.javaindex 8b593528431..cb0cb76aca3 100644--- a/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java+++ b/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java@@ -894,6 +894,23 @@ public class MemoryIndex {if (DEBUG) System.err.println(".nextPosition: " + pos);return pos;}++ /**+ * Not implemented.+ * @throws UnsupportedOperationException+ */+ public int getPayloadLength() {+ throw new UnsupportedOperationException();+ }++ /**+ * Not implemented.+ * @throws UnsupportedOperationException+ */+ public byte[] getPayload(byte[] data, int offset) throws IOException {+ throw new UnsupportedOperationException();+ }+};}