From bb36e3211e9bdc444daa8163a55c9609ca7d34eb Mon Sep 17 00:00:00 2001 From: alperozturk Date: Thu, 25 Apr 2024 16:37:42 +0200 Subject: [PATCH] Fix kotlin spotless Signed-off-by: alperozturk --- .../android/operations/UploadFileOperation.java | 12 +++++++----- .../com/owncloud/android/operations/e2e/E2EFiles.kt | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java b/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java index 9509db316fad..88b7c4b443ca 100644 --- a/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java +++ b/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java @@ -755,8 +755,12 @@ private void updateMetadataForE2E(Object object, E2EData e2eData, E2EClientData e2eFiles.getParentFile(), arbitraryDataProvider, metadataExists); - } else { - updateMetadataForV2(object, encryptionUtilsV2, e2eData, clientData, e2eFiles.getParentFile()); + } else if (object instanceof DecryptedFolderMetadataFile metadata) { + updateMetadataForV2(metadata, + encryptionUtilsV2, + e2eData, + clientData, + e2eFiles.getParentFile()); } } @@ -806,9 +810,7 @@ private void updateMetadataForV1(DecryptedFolderMetadataFileV1 metadata, E2EData } - private void updateMetadataForV2(Object object, EncryptionUtilsV2 encryptionUtilsV2, E2EData e2eData, E2EClientData clientData, OCFile parentFile) throws UploadException { - - DecryptedFolderMetadataFile metadata = (DecryptedFolderMetadataFile) object; + private void updateMetadataForV2(DecryptedFolderMetadataFile metadata, EncryptionUtilsV2 encryptionUtilsV2, E2EData e2eData, E2EClientData clientData, OCFile parentFile) throws UploadException { encryptionUtilsV2.addFileToMetadata( e2eData.getEncryptedFileName(), mFile, diff --git a/app/src/main/java/com/owncloud/android/operations/e2e/E2EFiles.kt b/app/src/main/java/com/owncloud/android/operations/e2e/E2EFiles.kt index e7c320c462d1..b201775b2d3f 100644 --- a/app/src/main/java/com/owncloud/android/operations/e2e/E2EFiles.kt +++ b/app/src/main/java/com/owncloud/android/operations/e2e/E2EFiles.kt @@ -9,7 +9,6 @@ package com.owncloud.android.operations.e2e import com.owncloud.android.datamodel.OCFile import com.owncloud.android.lib.common.utils.Log_OC -import com.owncloud.android.operations.UploadFileOperation import java.io.File data class E2EFiles(