From 9fc1c180b26e7d2d05384bf9a13d6e64a27fec04 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 7 Apr 2009 22:52:49 +0000 Subject: [PATCH] LUCENE-1546: also declare all subclasses' doCommit() to be deprecated git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@763024 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/index/DirectoryIndexReader.java | 1 + src/java/org/apache/lucene/index/FilterIndexReader.java | 4 ++++ src/java/org/apache/lucene/index/MultiReader.java | 1 + src/java/org/apache/lucene/index/ParallelReader.java | 1 + 4 files changed, 7 insertions(+) diff --git a/src/java/org/apache/lucene/index/DirectoryIndexReader.java b/src/java/org/apache/lucene/index/DirectoryIndexReader.java index f6dc5d4e998..54a6825d32e 100644 --- a/src/java/org/apache/lucene/index/DirectoryIndexReader.java +++ b/src/java/org/apache/lucene/index/DirectoryIndexReader.java @@ -350,6 +350,7 @@ abstract class DirectoryIndexReader extends IndexReader implements Cloneable { directory.close(); } + /** @deprecated */ protected void doCommit() throws IOException { doCommit(null); } diff --git a/src/java/org/apache/lucene/index/FilterIndexReader.java b/src/java/org/apache/lucene/index/FilterIndexReader.java index 926095ed627..2e45029bd2a 100644 --- a/src/java/org/apache/lucene/index/FilterIndexReader.java +++ b/src/java/org/apache/lucene/index/FilterIndexReader.java @@ -209,8 +209,12 @@ public class FilterIndexReader extends IndexReader { } protected void doDelete(int n) throws CorruptIndexException, IOException { in.deleteDocument(n); } + + /** @deprecated */ protected void doCommit() throws IOException { doCommit(null); } + protected void doCommit(String commitUserData) throws IOException { in.commit(commitUserData); } + protected void doClose() throws IOException { in.close(); } diff --git a/src/java/org/apache/lucene/index/MultiReader.java b/src/java/org/apache/lucene/index/MultiReader.java index f13db9297b2..2849a92ea1d 100644 --- a/src/java/org/apache/lucene/index/MultiReader.java +++ b/src/java/org/apache/lucene/index/MultiReader.java @@ -346,6 +346,7 @@ public class MultiReader extends IndexReader implements Cloneable { return new MultiTermPositions(subReaders, starts); } + /** @deprecated */ protected void doCommit() throws IOException { doCommit(null); } diff --git a/src/java/org/apache/lucene/index/ParallelReader.java b/src/java/org/apache/lucene/index/ParallelReader.java index d511e6f4ee3..fa00282a539 100644 --- a/src/java/org/apache/lucene/index/ParallelReader.java +++ b/src/java/org/apache/lucene/index/ParallelReader.java @@ -436,6 +436,7 @@ public class ParallelReader extends IndexReader { return (IndexReader[]) readers.toArray(new IndexReader[readers.size()]); } + /** @deprecated */ protected void doCommit() throws IOException { doCommit(null); }