Skip to content

Conversation

@tobiasKaminsky
Copy link
Member

Fixes: #8566
Library: nextcloud/android-library#843

Signed-off-by: tobiasKaminsky [email protected]

  • Tests written, or not not needed

@github-actions
Copy link

@nextcloud-android-bot
Copy link
Collaborator

Signed-off-by: tobiasKaminsky <[email protected]>
}

@VisibleForTesting
public String getLocalIdDirect() {
Copy link
Member

Choose a reason for hiding this comment

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

getInternalLocalId, or something like that, may be a better name.

Comment on lines +2476 to +2478
if (!upgraded) {
Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
}
Copy link
Member

Choose a reason for hiding this comment

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

What's the point of adding this between each upgrade if? It will print the same every time. Also, some upgrades set upgraded=true, but others don't. Looks like this needs cleanup, I will do it after this PR is merged

@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/10011.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.

@nextcloud-android-bot
Copy link
Collaborator

Codacy

Lint

TypemasterPR
Warnings9292
Errors00

SpotBugs (new)

Warning Type Number
Bad practice Warnings 28
Correctness Warnings 78
Experimental Warnings 1
Internationalization Warnings 9
Malicious code vulnerability Warnings 57
Multithreaded correctness Warnings 9
Performance Warnings 67
Security Warnings 29
Dodgy code Warnings 350
Total 628

SpotBugs (master)

Warning Type Number
Bad practice Warnings 28
Correctness Warnings 78
Experimental Warnings 1
Internationalization Warnings 9
Malicious code vulnerability Warnings 57
Multithreaded correctness Warnings 9
Performance Warnings 67
Security Warnings 29
Dodgy code Warnings 350
Total 628

Android-library is not set to master branch in build.gradle

@nextcloud-android-bot
Copy link
Collaborator

@github-actions
Copy link

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

@github-actions
Copy link

@AlvaroBrey
Copy link
Member

Similar trace in all failing tests (including screenshot)

java.lang.StringIndexOutOfBoundsException: length=3; index=8
at java.lang.String.substring(String.java:1971)
at com.owncloud.android.datamodel.OCFile.getLocalId(OCFile.java:560)
at com.owncloud.android.datamodel.FileDataStorageManager.saveFile(FileDataStorageManager.java:238)
at com.owncloud.android.datamodel.FileDataStorageManager.saveNewFile(FileDataStorageManager.java:348)
at com.owncloud.android.datamodel.FileDataStorageManagerIT.testSaveNewFile(FileDataStorageManagerIT.java:349)

Copy link
Member

@AlvaroBrey AlvaroBrey left a comment

Choose a reason for hiding this comment

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

failing tests, see previous comment

@joshtrichards
Copy link
Member

Superceded by #8643

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.

Use fileId instead of relying on remoteID

5 participants