From b69a9e3e75cc07f1730f2f673cea30f1feefac70 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 2 Mar 2023 20:09:29 +0100 Subject: [PATCH] Fix warnings in StorageException Exceptions are serializable and therefore should define serialVersionUID. Fix this omission. Change-Id: I24daa7ca923d6df71beaf7325b57fc306564f366 Signed-off-by: Robert Varga --- .../storage/journal/StorageException.java | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/StorageException.java b/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/StorageException.java index f7060e8387..e5dd9a2073 100644 --- a/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/StorageException.java +++ b/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/StorageException.java @@ -1,5 +1,6 @@ /* - * Copyright 2015-present Open Networking Foundation + * Copyright 2015-2021 Open Networking Foundation + * Copyright 2023 PANTHEON.tech, s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,37 +22,45 @@ package io.atomix.storage.journal; * @author Jordan Halterman */ public class StorageException extends RuntimeException { + @java.io.Serial + private static final long serialVersionUID = 1L; - public StorageException() { - } + public StorageException() { + } - public StorageException(String message) { - super(message); - } + public StorageException(final String message) { + super(message); + } - public StorageException(String message, Throwable cause) { - super(message, cause); - } + public StorageException(final String message, final Throwable cause) { + super(message, cause); + } - public StorageException(Throwable cause) { - super(cause); - } + public StorageException(final Throwable cause) { + super(cause); + } - /** - * Exception thrown when an entry being stored is too large. - */ - public static class TooLarge extends StorageException { - public TooLarge(String message) { - super(message); + /** + * Exception thrown when an entry being stored is too large. + */ + public static class TooLarge extends StorageException { + @java.io.Serial + private static final long serialVersionUID = 1L; + + public TooLarge(final String message) { + super(message); + } } - } - - /** - * Exception thrown when storage runs out of disk space. - */ - public static class OutOfDiskSpace extends StorageException { - public OutOfDiskSpace(String message) { - super(message); + + /** + * Exception thrown when storage runs out of disk space. + */ + public static class OutOfDiskSpace extends StorageException { + @java.io.Serial + private static final long serialVersionUID = 1L; + + public OutOfDiskSpace(final String message) { + super(message); + } } - } } -- 2.36.6