Add generated serialVersionUUID to exceptions 31/86131/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Nov 2019 10:18:13 +0000 (11:18 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 10:19:29 +0000 (11:19 +0100)
Exceptions are serializable and therefore should have a serial
version. Fixes Eclipse warnings pointing this out.

Change-Id: I2cf04412709cf3214b53aa3ac5dc40f332f67295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8b8f15eaed3f4ff2e4acba53e04f2c34b6861e2f)

library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/BadSchemaException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/ColumnSchemaNotFoundException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/InvalidEncodingException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/ParsingException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/SchemaVersionMismatchException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/TableSchemaNotFoundException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/TyperException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/UnexpectedResultException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/UnsupportedArgumentException.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/UnsupportedMethodException.java

index 1a8fc4a04dc478ef8d39e76a5238b912adb76b93..057541277818e7e52c8b069fa7e5e31f1a569665 100644 (file)
@@ -5,20 +5,19 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * BadSchema exception is thrown when the received schema is invalid.
  */
 public class BadSchemaException extends RuntimeException {
+    private static final long serialVersionUID = -7045398620135011253L;
 
-    public BadSchemaException(String message) {
+    public BadSchemaException(final String message) {
         super(message);
     }
 
-    public BadSchemaException(String message, Throwable cause) {
+    public BadSchemaException(final String message, final Throwable cause) {
         super(message, cause);
     }
-
 }
index 0491ece51031539f81d438c0a8f0d6107e46cce3..7a19226193245943f7b9612469a49cb048589296 100644 (file)
@@ -5,24 +5,23 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * This exception is thrown when a ColumnSchema cannot be found.
  */
 public class ColumnSchemaNotFoundException extends RuntimeException {
+    private static final long serialVersionUID = -5273616784432907818L;
 
-    public ColumnSchemaNotFoundException(String message) {
+    public ColumnSchemaNotFoundException(final String message) {
         super(message);
     }
 
-    public ColumnSchemaNotFoundException(String message, Throwable cause) {
+    public ColumnSchemaNotFoundException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
-    public static String createMessage(String columnName, String tableName) {
+    public static String createMessage(final String columnName, final String tableName) {
         return "Unable to locate ColumnSchema for " +  columnName + " in " + tableName;
     }
-
 }
index dcb40deeae8f608d9eadeb1d2672e9e8f0b1a35c..d592a7f2951d1afa77ef3cad78e06d0b916813bb 100644 (file)
@@ -5,17 +5,17 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * InvalidEncodingException in cases where something is not UTF-8 Encoded.
  */
 public class InvalidEncodingException extends RuntimeException {
+    private static final long serialVersionUID = -6333965543652086978L;
 
     private final String actual;
 
-    public InvalidEncodingException(String actual, String message) {
+    public InvalidEncodingException(final String actual, final String message) {
         super(message);
         this.actual = actual;
     }
index 808efe0dec1358be082cb5d352659935e9f78820..f1e6f2998eaa8db103fac9cc820ab34339f76e8b 100644 (file)
@@ -5,30 +5,31 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * The ParsingException is thrown when JSON could not be successfully parsed.
  */
 public class ParsingException extends RuntimeException {
+    private static final long serialVersionUID = -3950575478467855764L;
 
     public ParsingException() {
     }
 
-    public ParsingException(String message) {
+    public ParsingException(final String message) {
         super(message);
     }
 
-    public ParsingException(String message, Throwable cause) {
+    public ParsingException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
-    public ParsingException(Throwable cause) {
+    public ParsingException(final Throwable cause) {
         super(cause);
     }
 
-    public ParsingException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+    public ParsingException(final String message, final Throwable cause, final boolean enableSuppression,
+            final boolean writableStackTrace) {
         super(message, cause, enableSuppression, writableStackTrace);
     }
 }
index 43e9c0780c1a386ea7e82c55f5d575800bac5f30..4d982c49f9692d8a6cf787f75e34ad405326fc28 100644 (file)
@@ -15,8 +15,10 @@ import org.opendaylight.ovsdb.lib.notation.Version;
  * and the version requirements are not met.
  */
 public class SchemaVersionMismatchException extends RuntimeException {
+    private static final long serialVersionUID = -5194270510726950745L;
 
-    public SchemaVersionMismatchException(Version schemaVersion, Version fromVersion, Version untilVersion) {
+    public SchemaVersionMismatchException(final Version schemaVersion, final Version fromVersion,
+            final Version untilVersion) {
         super("The schema version used to access the table/column (" + schemaVersion + ") does not match the required"
                 + " version (from " + fromVersion + " to " + untilVersion + ")");
     }
index 420b5278e9659cf199798c51c4ab97a28cef0114..1b817ca1640c1b5d80eb78d024d24a55b9336885 100644 (file)
@@ -5,24 +5,23 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * This exception is thrown when a TableSchema cannot be found.
  */
 public class TableSchemaNotFoundException extends RuntimeException {
+    private static final long serialVersionUID = -5030339562929850369L;
 
-    public TableSchemaNotFoundException(String message) {
+    public TableSchemaNotFoundException(final String message) {
         super(message);
     }
 
-    public TableSchemaNotFoundException(String message, Throwable cause) {
+    public TableSchemaNotFoundException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
-    public static String createMessage(String tableName, String schemaName) {
+    public static String createMessage(final String tableName, final String schemaName) {
         return "Unable to locate TableSchema for " +  tableName + " in " + schemaName;
     }
-
 }
index a8d6efc810292cc4f6b8ff6ebf882e0a4b9020f2..863f9f2195aad1252b726270767c39f3cbd924d2 100644 (file)
@@ -5,19 +5,19 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * This is a generic exception thrown by the Typed Schema utilities.
  */
 public class TyperException extends RuntimeException {
+    private static final long serialVersionUID = 5464754787320848910L;
 
-    public TyperException(String message) {
+    public TyperException(final String message) {
         super(message);
     }
 
-    public TyperException(String message, Throwable cause) {
+    public TyperException(final String message, final Throwable cause) {
         super(message, cause);
     }
 }
index 5f50da49320f515e3fabf855ad799c3aa7b62e20..83d1b0261ee68e639931f09030bfb039b3f33ab4 100644 (file)
@@ -5,18 +5,19 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 /**
  * This exception is thrown when a result does not meet any of the known formats in RFC7047.
  */
 public class UnexpectedResultException extends RuntimeException {
-    public UnexpectedResultException(String message) {
+    private static final long serialVersionUID = 7440870601052355685L;
+
+    public UnexpectedResultException(final String message) {
         super(message);
     }
 
-    public UnexpectedResultException(String message, Throwable cause) {
+    public UnexpectedResultException(final String message, final Throwable cause) {
         super(message, cause);
     }
 }
index fd420be5b0ddd87daa63a95567dc98260a1a4033..c858dfe4861b7e3876fec5514787996bc110c33f 100644 (file)
@@ -5,16 +5,16 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 public class UnsupportedArgumentException extends RuntimeException {
+    private static final long serialVersionUID = -160548497974342130L;
 
-    public UnsupportedArgumentException(String message) {
+    public UnsupportedArgumentException(final String message) {
         super(message);
     }
 
-    public UnsupportedArgumentException(String message, Throwable cause) {
+    public UnsupportedArgumentException(final String message, final Throwable cause) {
         super(message, cause);
     }
 }
index 80b36805b735948a617d42990e54ce4d489a7c52..7c52f78c6de8f13d588f90cde2dd5e68965abefb 100644 (file)
@@ -5,16 +5,16 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.ovsdb.lib.error;
 
 public class UnsupportedMethodException extends RuntimeException {
+    private static final long serialVersionUID = -1665779125782132104L;
 
-    public UnsupportedMethodException(String message) {
+    public UnsupportedMethodException(final String message) {
         super(message);
     }
 
-    public UnsupportedMethodException(String message, Throwable cause) {
+    public UnsupportedMethodException(final String message, final Throwable cause) {
         super(message, cause);
     }
 }