From 3125fccd8dde211567c49a6fe508f80ace3b053b Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Mon, 11 Jul 2016 11:40:17 -0400 Subject: [PATCH] LUCENE-7373: remove deprecated API --- .../org/apache/lucene/store/Directory.java | 18 ------------------ .../lucene/store/TestFilterDirectory.java | 1 - 2 files changed, 19 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/store/Directory.java b/lucene/core/src/java/org/apache/lucene/store/Directory.java index 7a2062d15b1..3f9535b4cea 100644 --- a/lucene/core/src/java/org/apache/lucene/store/Directory.java +++ b/lucene/core/src/java/org/apache/lucene/store/Directory.java @@ -90,24 +90,6 @@ public abstract class Directory implements Closeable { */ public abstract void sync(Collection names) throws IOException; - /** - * Renames {@code source} to {@code dest} as an atomic operation, - * where {@code dest} does not yet exist in the directory. - *

- * Notes: This method is used by IndexWriter to publish commits. - * It is ok if this operation is not truly atomic, for example - * both {@code source} and {@code dest} can be visible temporarily. - * It is just important that the contents of {@code dest} appear - * atomically, or an exception is thrown. - * - * @deprecated Use {@link #rename} and {@link #syncMetaData} instead. - */ - @Deprecated - public final void renameFile(String source, String dest) throws IOException { - rename(source, dest); - syncMetaData(); - } - /** * Renames {@code source} to {@code dest} as an atomic operation, * where {@code dest} does not yet exist in the directory. diff --git a/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java b/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java index 8085462be08..6224140e3ca 100644 --- a/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java +++ b/lucene/core/src/test/org/apache/lucene/store/TestFilterDirectory.java @@ -39,7 +39,6 @@ public class TestFilterDirectory extends BaseDirectoryTestCase { Set exclude = new HashSet<>(); exclude.add(Directory.class.getMethod("copyFrom", Directory.class, String.class, String.class, IOContext.class)); exclude.add(Directory.class.getMethod("openChecksumInput", String.class, IOContext.class)); - exclude.add(Directory.class.getMethod("renameFile", String.class, String.class)); for (Method m : FilterDirectory.class.getMethods()) { if (m.getDeclaringClass() == Directory.class) { assertTrue("method " + m.getName() + " not overridden!", exclude.contains(m));