This is an automated email from the ASF dual-hosted git repository.

matthieu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 4c3654daec29c2eac85e87bf9c5fa3c1853b4dfa
Author: Rémi KOWALSKI <rkowal...@linagora.com>
AuthorDate: Thu Jan 16 17:30:04 2020 +0100

    JAMES-3028 rename IOObjectStoreException to ObjectStoreIOException
---
 .../src/main/java/org/apache/james/blob/api/DumbBlobStore.java    | 4 ++--
 .../{IOObjectStoreException.java => ObjectStoreIOException.java}  | 6 +++---
 .../org/apache/james/blob/api/ReadSaveDumbBlobStoreContract.java  | 4 ++--
 .../java/org/apache/james/blob/memory/MemoryDumbBlobStore.java    | 8 ++++----
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/server/blob/blob-api/src/main/java/org/apache/james/blob/api/DumbBlobStore.java
 
b/server/blob/blob-api/src/main/java/org/apache/james/blob/api/DumbBlobStore.java
index 79305d1..9f993c5 100644
--- 
a/server/blob/blob-api/src/main/java/org/apache/james/blob/api/DumbBlobStore.java
+++ 
b/server/blob/blob-api/src/main/java/org/apache/james/blob/api/DumbBlobStore.java
@@ -32,9 +32,9 @@ public interface DumbBlobStore {
      * Reads a Blob based on its BucketName and its BlobId.
      *
      * @throws ObjectNotFoundException when the blobId or the bucket is not 
found
-     * @throws IOObjectStoreException when an unexpected IO error occurs
+     * @throws ObjectStoreIOException when an unexpected IO error occurs
      */
-    InputStream read(BucketName bucketName, BlobId blobId) throws 
IOObjectStoreException, ObjectNotFoundException;
+    InputStream read(BucketName bucketName, BlobId blobId) throws 
ObjectStoreIOException, ObjectNotFoundException;
 
 
     /**
diff --git 
a/server/blob/blob-api/src/main/java/org/apache/james/blob/api/IOObjectStoreException.java
 
b/server/blob/blob-api/src/main/java/org/apache/james/blob/api/ObjectStoreIOException.java
similarity index 87%
rename from 
server/blob/blob-api/src/main/java/org/apache/james/blob/api/IOObjectStoreException.java
rename to 
server/blob/blob-api/src/main/java/org/apache/james/blob/api/ObjectStoreIOException.java
index b36d138..828ed62 100644
--- 
a/server/blob/blob-api/src/main/java/org/apache/james/blob/api/IOObjectStoreException.java
+++ 
b/server/blob/blob-api/src/main/java/org/apache/james/blob/api/ObjectStoreIOException.java
@@ -19,13 +19,13 @@
 
 package org.apache.james.blob.api;
 
-public class IOObjectStoreException extends ObjectStoreException {
+public class ObjectStoreIOException extends ObjectStoreException {
 
-    public IOObjectStoreException(String message) {
+    public ObjectStoreIOException(String message) {
         super(message);
     }
 
-    public IOObjectStoreException(String message, Throwable cause) {
+    public ObjectStoreIOException(String message, Throwable cause) {
         super(message, cause);
     }
 }
diff --git 
a/server/blob/blob-api/src/test/java/org/apache/james/blob/api/ReadSaveDumbBlobStoreContract.java
 
b/server/blob/blob-api/src/test/java/org/apache/james/blob/api/ReadSaveDumbBlobStoreContract.java
index 8a17f5b..820bd64 100644
--- 
a/server/blob/blob-api/src/test/java/org/apache/james/blob/api/ReadSaveDumbBlobStoreContract.java
+++ 
b/server/blob/blob-api/src/test/java/org/apache/james/blob/api/ReadSaveDumbBlobStoreContract.java
@@ -297,7 +297,7 @@ public interface ReadSaveDumbBlobStoreContract {
                 }
             })
             .block())
-        .isInstanceOf(IOObjectStoreException.class);
+        .isInstanceOf(ObjectStoreIOException.class);
     }
 
     @Test
@@ -306,7 +306,7 @@ public interface ReadSaveDumbBlobStoreContract {
 
         assertThatThrownBy(() -> store.save(TEST_BUCKET_NAME, TEST_BLOB_ID, 
getThrowingInputStream())
             .block())
-            .isInstanceOf(IOObjectStoreException.class);
+            .isInstanceOf(ObjectStoreIOException.class);
     }
 
     static Stream<Arguments> blobs() {
diff --git 
a/server/blob/blob-memory/src/main/java/org/apache/james/blob/memory/MemoryDumbBlobStore.java
 
b/server/blob/blob-memory/src/main/java/org/apache/james/blob/memory/MemoryDumbBlobStore.java
index 16a0a7b..6227d6d 100644
--- 
a/server/blob/blob-memory/src/main/java/org/apache/james/blob/memory/MemoryDumbBlobStore.java
+++ 
b/server/blob/blob-memory/src/main/java/org/apache/james/blob/memory/MemoryDumbBlobStore.java
@@ -27,8 +27,8 @@ import org.apache.commons.io.IOUtils;
 import org.apache.james.blob.api.BlobId;
 import org.apache.james.blob.api.BucketName;
 import org.apache.james.blob.api.DumbBlobStore;
-import org.apache.james.blob.api.IOObjectStoreException;
 import org.apache.james.blob.api.ObjectNotFoundException;
+import org.apache.james.blob.api.ObjectStoreIOException;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.HashBasedTable;
@@ -46,7 +46,7 @@ public class MemoryDumbBlobStore implements DumbBlobStore {
     }
 
     @Override
-    public InputStream read(BucketName bucketName, BlobId blobId) throws 
IOObjectStoreException, ObjectNotFoundException {
+    public InputStream read(BucketName bucketName, BlobId blobId) throws 
ObjectStoreIOException, ObjectNotFoundException {
         return readBytes(bucketName, blobId)
             .map(ByteArrayInputStream::new)
             .block();
@@ -73,7 +73,7 @@ public class MemoryDumbBlobStore implements DumbBlobStore {
                 try {
                     return IOUtils.toByteArray(inputStream);
                 } catch (IOException e) {
-                    throw new IOObjectStoreException("IOException occured", e);
+                    throw new ObjectStoreIOException("IOException occured", e);
                 }
             })
             .flatMap(bytes -> save(bucketName, blobId, bytes));
@@ -85,7 +85,7 @@ public class MemoryDumbBlobStore implements DumbBlobStore {
                 try {
                     return content.read();
                 } catch (IOException e) {
-                    throw new IOObjectStoreException("IOException occured", e);
+                    throw new ObjectStoreIOException("IOException occured", e);
                 }
             })
             .flatMap(bytes -> save(bucketName, blobId, bytes));


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to