Skip to content

Album remote operations - #1736

Merged
alperozturk96 merged 16 commits into
masterfrom
nmc/albums
Aug 14, 2026
Merged

Album remote operations#1736
alperozturk96 merged 16 commits into
masterfrom
nmc/albums

Conversation

@surinder-tsys

Copy link
Copy Markdown
Collaborator

This PR contains the Remote operations for the Albums functionality.

@github-actions

github-actions Bot commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3435
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

@github-actions

github-actions Bot commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3435
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Comment thread library/src/main/java/com/owncloud/android/lib/common/utils/WebDavFileUtils.java Outdated
@github-actions

github-actions Bot commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3435
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161162

SpotBugs increased!

@github-actions

github-actions Bot commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161161

@alperozturk96 alperozturk96 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update. You can use the following command to fix spot bugs and formatting.

./gradlew detekt → it detects and gives HTML output, so that you can check it.
./gradlew :app:spotlessApply → reformats Kotlin code

@github-actions

github-actions Bot commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161161

@alperozturk96 alperozturk96 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following issues were found during analysis. Please fix them where possible. Thank you.

NestedBlockDepth (You can suppress with annotation if you are not able to extract the nested blocks) → ReadAlbumItemsRemoteOperation.kt:28:18

TooGenericExceptionCaught (You can suppress with annotation since error handling in remote operation is not well-designed in the current architecture) →
→ CopyFileToAlbumRemoteOperation.kt:88:18
→ CreateNewAlbumRemoteOperation.kt:57:18
→ ReadAlbumItemsRemoteOperation.kt:68:18
→ ReadAlbumsRemoteOperation.kt:57:18
→ RemoveAlbumFileRemoteOperation.kt:45:18
→ RemoveAlbumRemoteOperation.kt:53:18
→ RenameAlbumRemoteOperation.kt:55:18

MagicNumber (You can create constants in companion object and use them):
→ CopyFileToAlbumRemoteOperation.kt:131:76
→ PhotoAlbumEntry.kt:83:61

NewLineAtEndOfFile (You can add a new line at the end of the file):
→ PhotoAlbumEntry.kt:91:2
→ ToggleAlbumFavoriteRemoteOperation.kt:73:2
→ PhotoAlbumEntryTest.kt:57:2

ReturnCount (You can try to reduce return counts. If not possible, you can use annotation to suppress it):
→ CopyFileToAlbumRemoteOperation.kt:42:18

@surinder-tsys

Copy link
Copy Markdown
Collaborator Author

The following issues were found during analysis. Please fix them where possible. Thank you.

NestedBlockDepth (You can suppress with annotation if you are not able to extract the nested blocks) → ReadAlbumItemsRemoteOperation.kt:28:18

TooGenericExceptionCaught (You can suppress with annotation since error handling in remote operation is not well-designed in the current architecture) → → CopyFileToAlbumRemoteOperation.kt:88:18 → CreateNewAlbumRemoteOperation.kt:57:18 → ReadAlbumItemsRemoteOperation.kt:68:18 → ReadAlbumsRemoteOperation.kt:57:18 → RemoveAlbumFileRemoteOperation.kt:45:18 → RemoveAlbumRemoteOperation.kt:53:18 → RenameAlbumRemoteOperation.kt:55:18

MagicNumber (You can create constants in companion object and use them): → CopyFileToAlbumRemoteOperation.kt:131:76 → PhotoAlbumEntry.kt:83:61

NewLineAtEndOfFile (You can add a new line at the end of the file): → PhotoAlbumEntry.kt:91:2 → ToggleAlbumFavoriteRemoteOperation.kt:73:2 → PhotoAlbumEntryTest.kt:57:2

ReturnCount (You can try to reduce return counts. If not possible, you can use annotation to suppress it): → CopyFileToAlbumRemoteOperation.kt:42:18

Addressed all the issues. Can you please check?

@github-actions

github-actions Bot commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161161

@alperozturk96

Copy link
Copy Markdown
Collaborator

Screenshot 2025-06-10 at 11 21 51

@tobiasKaminsky @AndyScherzinger Why REUSE Complicance Check is failing?

e.g.

/*
 * Nextcloud Android Library
 *
 * SPDX-FileCopyrightText: 2025 TSI-mc <surinder.kumar@t-systems.com>
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

It should be SPDX-License-Identifier: MIT instead of AGPL-3.0-or-later?

@AndyScherzinger

AndyScherzinger commented Jun 10, 2025

Copy link
Copy Markdown
Member

It should be SPDX-License-Identifier: MIT instead of AGPL-3.0-or-later?

@alperozturk96 @surinder-tsys Correct, the lib is MIT hence any contribution to it has to be MIT

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@surinder-tsys

Copy link
Copy Markdown
Collaborator Author

@AndyScherzinger @alperozturk96 I have taken care of copyright and updated PR.

@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3434
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness1111
Performance89
Total168169

SpotBugs increased!

@alperozturk96

alperozturk96 commented Jun 20, 2025

Copy link
Copy Markdown
Collaborator

@surinder-tsys Thank you for the update. There are three remaining items to address, once those are resolved, I can proceed with reviewing the client PR. If everything looks good there, we can move forward with merging this PR.

check (spotlessKotlinCheck)

src/main/java/com/owncloud/android/lib/resources/albums/CopyFileToAlbumRemoteOperation.kt:L1 ktlint(standard:max-line-length) Exceeded max line length (120)


Screenshot 2025-06-20 at 15 21 21

Screenshot 2025-06-20 at 15 22 17

@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3131
Correctness2828
Dodgy code1414
Internationalization66
Malicious code vulnerability2626
Multithreaded correctness77
Performance77
Security44
Total123123

@nextcloud-android-bot

Copy link
Copy Markdown
Collaborator

@nextcloud-android-bot

Copy link
Copy Markdown
Collaborator

@nextcloud-android-bot

Copy link
Copy Markdown
Collaborator

surinder-tsys and others added 14 commits August 13, 2026 13:53
Signed-off-by: A117870935 <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>

# Conflicts:
#	library/src/main/java/com/owncloud/android/lib/common/network/WebdavEntry.kt
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: Surinder Kumar <surinder.kumar@t-systems.com>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3131
Correctness2828
Dodgy code1414
Internationalization66
Malicious code vulnerability2626
Multithreaded correctness77
Performance77
Security44
Total123123

@tobiasKaminsky

Copy link
Copy Markdown
Member

Seems tests were only flaky ✔

tobiasKaminsky
tobiasKaminsky previously approved these changes Aug 14, 2026
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown
Contributor

SpotBugs

CategoryBaseNew
Bad practice3131
Correctness2828
Dodgy code1414
Internationalization66
Malicious code vulnerability2626
Multithreaded correctness77
Performance77
Security44
Total123123

@alperozturk96
alperozturk96 merged commit c35b519 into master Aug 14, 2026
19 checks passed
@alperozturk96
alperozturk96 deleted the nmc/albums branch August 14, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants