From: Robert Varga Date: Thu, 2 Mar 2023 08:57:23 +0000 (+0100) Subject: Remove AtomixIOException X-Git-Tag: v7.0.5~84 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=53e6efd7b5d57ca2621230c8d13d53f69035e379;p=controller.git Remove AtomixIOException 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 --- diff --git a/third-party/atomix/storage/src/main/java/io/atomix/storage/buffer/MappedBytes.java b/third-party/atomix/storage/src/main/java/io/atomix/storage/buffer/MappedBytes.java index 5ad4c03566..9f4edbf6e4 100644 --- a/third-party/atomix/storage/src/main/java/io/atomix/storage/buffer/MappedBytes.java +++ b/third-party/atomix/storage/src/main/java/io/atomix/storage/buffer/MappedBytes.java @@ -15,7 +15,6 @@ */ package io.atomix.storage.buffer; -import io.atomix.utils.AtomixIOException; 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) { - 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 index a59869cc7f..0000000000 --- a/third-party/atomix/utils/src/main/java/io/atomix/utils/AtomixIOException.java +++ /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 index 6c1341b6ee..0000000000 --- a/third-party/atomix/utils/src/main/java/io/atomix/utils/package-info.java +++ /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;