Skip to content

fix(file-sort): concurrent modification exception#15985

Merged
alperozturk96 merged 8 commits into
masterfrom
fix/sort-concurrent-modification-exception
Dec 17, 2025
Merged

fix(file-sort): concurrent modification exception#15985
alperozturk96 merged 8 commits into
masterfrom
fix/sort-concurrent-modification-exception

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator
  • Tests written, or not not needed

How to reproduce?

Open local file list to upload some file (make sure local file list contains more than 50 files)
Sort file order

Fixes

Exception java.util.ConcurrentModificationException:
  at java.util.ArrayList.sort (ArrayList.java:1823)
  at java.util.Collections.sort (Collections.java:207)
  at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith (MutableCollectionsJVM.kt:42)
  at com.owncloud.android.utils.FileSortOrderByDate.sortLocalFiles (FileSortOrderByDate.kt:51)
  at com.owncloud.android.ui.adapter.LocalFileListAdapter.lambda$setSortOrder$6 (LocalFileListAdapter.java:392)
  at com.owncloud.android.ui.adapter.LocalFileListAdapter.$r8$lambda$WTDJyclhOx9wYl9P9c9Mv0A876o (Unknown Source)
  at com.owncloud.android.ui.adapter.LocalFileListAdapter$$ExternalSyntheticLambda3.run (D8$$SyntheticClass)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1156)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:651)
  at java.lang.Thread.run (Thread.java:1119)

@alperozturk96 alperozturk96 force-pushed the fix/sort-concurrent-modification-exception branch 4 times, most recently from 5640578 to 9e2ae86 Compare November 26, 2025 08:00
@alperozturk96 alperozturk96 force-pushed the fix/sort-concurrent-modification-exception branch from f950e05 to 71d1884 Compare December 1, 2025 07:18
@alperozturk96 alperozturk96 force-pushed the fix/sort-concurrent-modification-exception branch 2 times, most recently from 70803e1 to 56f5516 Compare December 10, 2025 13:52
@alperozturk96

Copy link
Copy Markdown
Collaborator Author

/backport to stable-3.35

@alperozturk96 alperozturk96 linked an issue Dec 15, 2025 that may be closed by this pull request
4 tasks
@alperozturk96 alperozturk96 force-pushed the fix/sort-concurrent-modification-exception branch from 56f5516 to c895490 Compare December 17, 2025 09:39
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>

# Conflicts:
#	app/src/main/java/com/owncloud/android/ui/fragment/LocalFileListFragment.java
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 force-pushed the fix/sort-concurrent-modification-exception branch from c895490 to 216402c Compare December 17, 2025 10:32
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 merged commit 33c5f66 into master Dec 17, 2025
12 of 19 checks passed
@alperozturk96 alperozturk96 deleted the fix/sort-concurrent-modification-exception branch December 17, 2025 10:53
@github-actions

Copy link
Copy Markdown

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15985.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions

Copy link
Copy Markdown

test-Unit test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions

Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants