From 76bf6740d17304b6502c840c022dd27820b62554 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Thu, 24 Sep 2015 21:32:24 +0000 Subject: [PATCH] LUCENE-6813: remove newly deceased code git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1705162 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/util/TestOfflineSorter.java | 2 -- .../org/apache/lucene/bkdtree/BKDTreeWriter.java | 13 ------------- .../apache/lucene/rangetree/RangeTreeWriter.java | 13 ------------- .../apache/lucene/bkdtree3d/BKD3DTreeWriter.java | 13 ------------- 4 files changed, 41 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java b/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java index 005806a3f9e..82e9cef9b88 100644 --- a/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java +++ b/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java @@ -27,8 +27,6 @@ import java.util.Arrays; import java.util.Comparator; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.lucene.util.IOUtils; -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.OfflineSorter.BufferSize; import org.apache.lucene.util.OfflineSorter.ByteSequencesWriter; import org.apache.lucene.util.OfflineSorter.SortInfo; diff --git a/lucene/sandbox/src/java/org/apache/lucene/bkdtree/BKDTreeWriter.java b/lucene/sandbox/src/java/org/apache/lucene/bkdtree/BKDTreeWriter.java index 0d14a1e9c88..2194e3d368e 100644 --- a/lucene/sandbox/src/java/org/apache/lucene/bkdtree/BKDTreeWriter.java +++ b/lucene/sandbox/src/java/org/apache/lucene/bkdtree/BKDTreeWriter.java @@ -443,19 +443,6 @@ class BKDTreeWriter { return indexFP; } - // Called only from assert - private boolean directoryIsEmpty(Path in) { - try (DirectoryStream dir = Files.newDirectoryStream(in)) { - for (Path path : dir) { - assert false: "dir=" + in + " still has file=" + path; - return false; - } - } catch (IOException ioe) { - // Just ignore: we are only called from assert - } - return true; - } - /** Sliced reference to points in an OfflineSorter.ByteSequencesWriter file. */ private static final class PathSlice { final LatLonWriter writer; diff --git a/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeWriter.java b/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeWriter.java index ef9b16696e0..8b81e527926 100644 --- a/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeWriter.java +++ b/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeWriter.java @@ -386,19 +386,6 @@ class RangeTreeWriter { return indexFP; } - // Called only from assert - private boolean directoryIsEmpty(Path in) { - try (DirectoryStream dir = Files.newDirectoryStream(in)) { - for (Path path : dir) { - assert false: "dir=" + in + " still has file=" + path; - return false; - } - } catch (IOException ioe) { - // Just ignore: we are only called from assert - } - return true; - } - /** Sliced reference to points in an OfflineSorter.ByteSequencesWriter file. */ private static final class PathSlice { final SliceWriter writer; diff --git a/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/BKD3DTreeWriter.java b/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/BKD3DTreeWriter.java index 02fbe5e5eac..743da8f940f 100644 --- a/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/BKD3DTreeWriter.java +++ b/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/BKD3DTreeWriter.java @@ -452,19 +452,6 @@ class BKD3DTreeWriter { return indexFP; } - // Called only from assert - private boolean directoryIsEmpty(Path in) { - try (DirectoryStream dir = Files.newDirectoryStream(in)) { - for (Path path : dir) { - assert false: "dir=" + in + " still has file=" + path; - return false; - } - } catch (IOException ioe) { - // Just ignore: we are only called from assert - } - return true; - } - /** Sliced reference to points in an OfflineSorter.ByteSequencesWriter file. */ private static final class PathSlice { final Writer writer;