Skip to content

Conversation

@vince-bourgmayer
Copy link

…onse header

  • Add a private static final value which is the response header's name for etag.
  • update 'RemoteOperationResult uploadFile(OwnCloudClient client)' to check for this header, and set value as RemoteOperationResult's data.

@codecov
Copy link

codecov bot commented Apr 21, 2022

Codecov Report

Merging #870 (01f0cb2) into master (f8105d3) will increase coverage by 0.03%.
The diff coverage is 37.50%.

@@            Coverage Diff             @@
##           master     #870      +/-   ##
==========================================
+ Coverage   48.09%   48.13%   +0.03%     
==========================================
  Files         168      168              
  Lines        6481     6484       +3     
  Branches      846      847       +1     
==========================================
+ Hits         3117     3121       +4     
+ Misses       2908     2907       -1     
  Partials      456      456              
Impacted Files Coverage Δ
...lib/resources/files/UploadFileRemoteOperation.java 52.08% <37.50%> (+0.47%) ⬆️
...wncloud/android/lib/resources/files/FileUtils.java 85.71% <0.00%> (+14.28%) ⬆️

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.

Looks fine, but since the RemoteOperationResult has result data, it should be parameterized.

For this:

  • UploadFileRemoteOperation should extend RemoteOperation<String> rather than the raw type
  • Variables and return types should be RemoteOperationResult<String> (or RemoteOperationResult<> where applicable) rather than the raw type.

AlvaroBrey
AlvaroBrey previously approved these changes Apr 22, 2022
@AlvaroBrey
Copy link
Member

@AlvaroBrey AlvaroBrey linked an issue Apr 22, 2022 that may be closed by this pull request
vincent Bourgmayer added 2 commits April 25, 2022 08:58
…onse header

- Add a private static final value which is the response header's name for etag.
- update 'RemoteOperationResult uploadFile(OwnCloudClient client)' to check for this header, and set value as RemoteOperationResult's data.

Signed-off-by: vincent Bourgmayer <[email protected]>
@vince-bourgmayer
Copy link
Author

@nextcloud-android-bot
Copy link
Collaborator

SpotBugs (new)

Warning Type Number
Bad practice Warnings 11
Correctness Warnings 36
Internationalization Warnings 6
Malicious code vulnerability Warnings 54
Multithreaded correctness Warnings 3
Performance Warnings 14
Security Warnings 1
Dodgy code Warnings 45
Total 170

SpotBugs (master)

Warning Type Number
Bad practice Warnings 11
Correctness Warnings 36
Internationalization Warnings 6
Malicious code vulnerability Warnings 54
Multithreaded correctness Warnings 3
Performance Warnings 14
Security Warnings 1
Dodgy code Warnings 45
Total 170

@AlvaroBrey AlvaroBrey enabled auto-merge April 25, 2022 07:35
@AlvaroBrey AlvaroBrey merged commit 5f30082 into nextcloud:master Apr 25, 2022
@vince-bourgmayer vince-bourgmayer deleted the 868-issue-uploadFile-share-latestEtag branch April 25, 2022 07:40
@AlvaroBrey
Copy link
Member

Thank you @vince-bourgmayer !

@AlvaroBrey AlvaroBrey added this to the NC Android Lib 2.11.0 milestone Apr 25, 2022
tobiasKaminsky added a commit that referenced this pull request Apr 27, 2022
Signed-off-by: tobiasKaminsky <[email protected]>
tobiasKaminsky added a commit that referenced this pull request Apr 27, 2022
Signed-off-by: tobiasKaminsky <[email protected]>
tobiasKaminsky added a commit that referenced this pull request Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get access to Etag after at the end of an UploadFileRemoteOperation

3 participants