Remove AtomixIOException 95/104695/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 08:57:23 +0000 (09:57 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 08:58:21 +0000 (09:58 +0100)
There is only a single user, which is using a plain RuntimeException
in other places to wrap IOException. Just remove AtomixIOException, as
it has no value.

JIRA: CONTROLLER-2071
Change-Id: Ia7b682c5875e27011b2bdcca4b9712cb9a3c5b5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
third-party/atomix/storage/src/main/java/io/atomix/storage/buffer/MappedBytes.java
third-party/atomix/utils/src/main/java/io/atomix/utils/AtomixIOException.java [deleted file]
third-party/atomix/utils/src/main/java/io/atomix/utils/package-info.java [deleted file]

index 5ad4c03566df7f62269e892394114a209b42bc13..9f4edbf6e4115842488ed3ca97cd2704afabbeff 100644 (file)
@@ -15,7 +15,6 @@
  */
 package io.atomix.storage.buffer;
 
  */
 package io.atomix.storage.buffer;
 
-import io.atomix.utils.AtomixIOException;
 import io.atomix.utils.memory.BufferCleaner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import io.atomix.utils.memory.BufferCleaner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -86,7 +85,7 @@ public class MappedBytes extends ByteBufferBytes {
     try {
       return randomAccessFile.getChannel().map(mode, 0, size);
     } catch (IOException e) {
     try {
       return randomAccessFile.getChannel().map(mode, 0, size);
     } catch (IOException e) {
-      throw new AtomixIOException(e);
+      throw new RuntimeException(e);
     }
   }
 
     }
   }
 
diff --git a/third-party/atomix/utils/src/main/java/io/atomix/utils/AtomixIOException.java b/third-party/atomix/utils/src/main/java/io/atomix/utils/AtomixIOException.java
deleted file mode 100644 (file)
index a59869c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.atomix.utils;
-
-/**
- * Atomix I/O exception.
- */
-public class AtomixIOException extends RuntimeException {
-  public AtomixIOException() {
-  }
-
-  public AtomixIOException(String message) {
-    super(message);
-  }
-
-  public AtomixIOException(String message, Object... args) {
-    super(String.format(message, args));
-  }
-
-  public AtomixIOException(String message, Throwable cause) {
-    super(message, cause);
-  }
-
-  public AtomixIOException(Throwable cause) {
-    super(cause);
-  }
-}
diff --git a/third-party/atomix/utils/src/main/java/io/atomix/utils/package-info.java b/third-party/atomix/utils/src/main/java/io/atomix/utils/package-info.java
deleted file mode 100644 (file)
index 6c1341b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Provides utility classes and interfaces used throughout Atomix projects.
- */
-package io.atomix.utils;