From 31da2fc46d8a4e5f3329b9ab502bce4b7b7f1ce7 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Thu, 4 Jul 2019 11:46:16 +0200 Subject: [PATCH] codacy: Classes implementing Serializable should set a serialVersionUID Signed-off-by: Andy Scherzinger --- .../java/com/nextcloud/client/di/InjectorNotFoundException.java | 2 ++ .../com/owncloud/android/datastorage/UniqueStorageList.java | 2 ++ .../android/operations/RemoteOperationFailedException.java | 2 ++ .../java/com/owncloud/android/ui/activity/StorageMigration.java | 1 + 4 files changed, 7 insertions(+) diff --git a/src/main/java/com/nextcloud/client/di/InjectorNotFoundException.java b/src/main/java/com/nextcloud/client/di/InjectorNotFoundException.java index 3d500f4715..1c2c6174dd 100644 --- a/src/main/java/com/nextcloud/client/di/InjectorNotFoundException.java +++ b/src/main/java/com/nextcloud/client/di/InjectorNotFoundException.java @@ -21,6 +21,8 @@ package com.nextcloud.client.di; class InjectorNotFoundException extends RuntimeException { + private static final long serialVersionUID = 2026042918255104421L; + InjectorNotFoundException(Object object, Throwable cause) { super( String.format( diff --git a/src/main/java/com/owncloud/android/datastorage/UniqueStorageList.java b/src/main/java/com/owncloud/android/datastorage/UniqueStorageList.java index 047a897781..73e38cef2d 100644 --- a/src/main/java/com/owncloud/android/datastorage/UniqueStorageList.java +++ b/src/main/java/com/owncloud/android/datastorage/UniqueStorageList.java @@ -30,6 +30,8 @@ import java.util.Vector; * @author Bartosz Przybylski */ public class UniqueStorageList extends Vector { + private static final long serialVersionUID = -6504937852826767050L; + @Override public boolean add(StoragePoint sp) { try { diff --git a/src/main/java/com/owncloud/android/operations/RemoteOperationFailedException.java b/src/main/java/com/owncloud/android/operations/RemoteOperationFailedException.java index 2549a26097..ab26dfae16 100644 --- a/src/main/java/com/owncloud/android/operations/RemoteOperationFailedException.java +++ b/src/main/java/com/owncloud/android/operations/RemoteOperationFailedException.java @@ -4,6 +4,8 @@ package com.owncloud.android.operations; * RuntimeException for throwing errors of remote operation calls. */ public class RemoteOperationFailedException extends RuntimeException { + private static final long serialVersionUID = 5429778514835938713L; + /** * Constructs a new runtime exception with the specified detail message and * cause. diff --git a/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java b/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java index 702db11a65..1f58fc6329 100644 --- a/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java +++ b/src/main/java/com/owncloud/android/ui/activity/StorageMigration.java @@ -317,6 +317,7 @@ public class StorageMigration { static private class FileMigrationTask extends FileMigrationTaskBase { private class MigrationException extends Exception { + private static final long serialVersionUID = -4575848188034992066L; private int mResId; MigrationException(int resId) {