You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2018/08/28 13:12:10 UTC

lucene-solr:branch_7x: LUCENE-8468: use NoSuchFileException instead of FileNotFoundException.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 7eb7b90ed -> 86efdaa6b


LUCENE-8468: use NoSuchFileException instead of FileNotFoundException.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/86efdaa6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/86efdaa6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/86efdaa6

Branch: refs/heads/branch_7x
Commit: 86efdaa6b63d3cd67bc78fba1b31036d65b17f67
Parents: 7eb7b90
Author: Dawid Weiss <dw...@apache.org>
Authored: Tue Aug 28 15:11:52 2018 +0200
Committer: Dawid Weiss <dw...@apache.org>
Committed: Tue Aug 28 15:12:00 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/lucene/store/ByteBuffersDirectory.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86efdaa6/lucene/core/src/java/org/apache/lucene/store/ByteBuffersDirectory.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/store/ByteBuffersDirectory.java b/lucene/core/src/java/org/apache/lucene/store/ByteBuffersDirectory.java
index acff5cf..50fbc02 100644
--- a/lucene/core/src/java/org/apache/lucene/store/ByteBuffersDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/ByteBuffersDirectory.java
@@ -16,7 +16,6 @@
  */
 package org.apache.lucene.store;
 
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.file.AccessDeniedException;
@@ -151,7 +150,7 @@ public final class ByteBuffersDirectory extends BaseDirectory {
     ensureOpen();
     FileEntry removed = files.remove(name);
     if (removed == null) {
-      throw new FileNotFoundException(name);
+      throw new NoSuchFileException(name);
     }
   }
 
@@ -160,7 +159,7 @@ public final class ByteBuffersDirectory extends BaseDirectory {
     ensureOpen();
     FileEntry file = files.get(name);
     if (file == null) {
-      throw new FileNotFoundException(name);
+      throw new NoSuchFileException(name);
     }
     return file.length();
   }
@@ -193,7 +192,7 @@ public final class ByteBuffersDirectory extends BaseDirectory {
 
     FileEntry file = files.get(source);
     if (file == null) {
-      throw new FileNotFoundException(source);
+      throw new NoSuchFileException(source);
     }
     if (files.putIfAbsent(dest, file) != null) {
       throw new FileAlreadyExistsException(dest);