Skip to content

Create UserAccountManager and move getAccounts() - #3895

Merged
AndyScherzinger merged 2 commits into
masterfrom
ezaquarii/user-account-manager
Apr 13, 2019
Merged

Create UserAccountManager and move getAccounts()#3895
AndyScherzinger merged 2 commits into
masterfrom
ezaquarii/user-account-manager

Conversation

@ezaquarii

Copy link
Copy Markdown
Collaborator

Signed-off-by: Chris Narkiewicz hello@ezaquarii.com

@ezaquarii
ezaquariiforce-pushed the ezaquarii/user-account-manager branch 3 times, most recently from 501bda3 to d907dc2CompareApril 12, 2019 22:08
@codecov

codecovBot commented Apr 12, 2019

Copy link
Copy Markdown

Codecov Report

Merging #3895 into master will increase coverage by 0.05%.
The diff coverage is 26.42%.

@@ Coverage Diff @@## master #3895 +/- ##
===========================================
+ Coverage 6.41% 6.46% +0.05% 
Complexity 1 1 ===========================================
Files 323 325 +2 Lines 31220 31247 +27 Branches 4477 4479 +2 ===========================================
+ Hits 2002 2021 +19 - Misses 28921 28930 +9 + Partials 297 296 -1
Impacted FilesCoverage ΔComplexity Δ
...java/com/nextcloud/client/di/ComponentsModule.java0% <ø> (ø)0 <0> (ø)⬇️
.../owncloud/android/authentication/AccountUtils.java46.03% <ø> (+22.26%)0 <0> (ø)⬇️
...java/com/owncloud/android/jobs/OfflineSyncJob.java0% <0%> (ø)0 <0> (ø)⬇️
...ncloud/android/ui/activity/UploadListActivity.java0% <0%> (ø)0 <0> (ø)⬇️
...ava/com/owncloud/android/jobs/NotificationJob.java0% <0%> (ø)0 <0> (ø)⬇️
...owncloud/android/ui/activity/UserInfoActivity.java0% <0%> (ø)0 <0> (ø)⬇️
...wncloud/android/ui/adapter/AccountListAdapter.java0% <0%> (ø)0 <0> (ø)⬇️
...n/java/com/owncloud/android/jobs/FilesSyncJob.java0% <0%> (ø)0 <0> (ø)⬇️
...ain/java/com/owncloud/android/ui/TextDrawable.java0% <0%> (ø)0 <0> (ø)⬇️
...m/nextcloud/client/account/UserAccountManager.java0% <0%> (ø)0 <0> (?)
... and 24 more

@codecov

codecovBot commented Apr 12, 2019

Copy link
Copy Markdown

Codecov Report

Merging #3895 into master will increase coverage by 0.05%.
The diff coverage is 26.81%.

@@ Coverage Diff @@## master #3895 +/- ##
===========================================
+ Coverage 6.41% 6.46% +0.05% 
Complexity 1 1 ===========================================
Files 323 325 +2 Lines 31220 31245 +25 Branches 4477 4478 +1 ===========================================
+ Hits 2002 2021 +19 - Misses 28921 28928 +7 + Partials 297 296 -1
Impacted FilesCoverage ΔComplexity Δ
...java/com/nextcloud/client/di/ComponentsModule.java0% <ø> (ø)0 <0> (ø)⬇️
.../owncloud/android/authentication/AccountUtils.java46.03% <ø> (+22.26%)0 <0> (ø)⬇️
...ain/java/com/owncloud/android/ui/TextDrawable.java0% <0%> (ø)0 <0> (ø)⬇️
...ncloud/android/ui/activity/UploadListActivity.java0% <0%> (ø)0 <0> (ø)⬇️
...ava/com/owncloud/android/jobs/NotificationJob.java0% <0%> (ø)0 <0> (ø)⬇️
...owncloud/android/ui/activity/UserInfoActivity.java0% <0%> (ø)0 <0> (ø)⬇️
...wncloud/android/ui/adapter/AccountListAdapter.java0% <0%> (ø)0 <0> (ø)⬇️
...n/java/com/owncloud/android/jobs/FilesSyncJob.java0% <0%> (ø)0 <0> (ø)⬇️
...java/com/owncloud/android/jobs/OfflineSyncJob.java0% <0%> (ø)0 <0> (ø)⬇️
...m/nextcloud/client/account/UserAccountManager.java0% <0%> (ø)0 <0> (?)
... and 24 more

@ezaquarii

ezaquarii commented Apr 12, 2019

Copy link
Copy Markdown
CollaboratorAuthor

Due ot large amount of global state accessed via static getters, the app has absolutely insane amount of circular dependencies that we try to break right now using Dependency Injection.

The problem is that if you touch anything, SpotBugs will most likely find new circular dependencies (and forget others), making PR landing rather tricky.

I decided do suppress FCCD_FIND_CLASS_CIRCULAR_DEPENDENCY SpotBugs error for now, because:

  1. it is quite unmanageable anyway
  2. it will be improved as a side effect of DI

For the time being, breaking those circlular deps causes linter to find more of them, which is an observation of limited use.

@ezaquarii

Copy link
Copy Markdown
CollaboratorAuthor

BTW, FindBugs suffered from the same issue - there is no regression here.

@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment from ezaquariiApr 12, 2019
@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment from ezaquariiApr 12, 2019
@nextcloudnextcloud deleted a comment Apr 12, 2019
@nextcloudnextcloud deleted a comment from ezaquariiApr 12, 2019
@nextcloudnextcloud deleted a comment from ezaquariiApr 12, 2019
@ezaquarii

Copy link
Copy Markdown
CollaboratorAuthor

Analysis died:

Exception analyzing com.owncloud.android.ui.adapter.TrashbinListAdapter using detector com.mebigfatguy.fbcontrib.detect.FunctionalInterfaceIssues java.lang.ClassCastException: org.apache.bcel.classfile.BootstrapMethods cannot be cast to org.apache.bcel.classfile.Unknown 

I'm not sure if it's me or flaky check.

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
@ezaquarii
ezaquariiforce-pushed the ezaquarii/user-account-manager branch from 482190f to bbaf355CompareApril 12, 2019 23:06
… [skip ci]
Signed-off-by: nextcloud-android-bot <android@nextcloud.com>
@nextcloud-android-bot

Copy link
Copy Markdown
Collaborator

Codacy

277

Lint

TypemasterPR
Warnings5757
Errors00

SpotBugs (new)

Warning TypeNumber
Bad practice Warnings25
Correctness Warnings84
Internationalization Warnings15
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings124
Security Warnings48
Dodgy code Warnings132
Total441

SpotBugs (master)

Warning TypeNumber
Bad practice Warnings25
Correctness Warnings114
Internationalization Warnings15
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings124
Security Warnings48
Dodgy code Warnings131
Total470

@AndyScherzinger
AndyScherzinger merged commit 4442d5a into masterApr 13, 2019
@AndyScherzinger
AndyScherzinger deleted the ezaquarii/user-account-manager branch April 13, 2019 06:42
tobiasKaminsky added a commit that referenced this pull request Apr 14, 2019
4442d5a Merge pull request #3895 from nextcloud/ezaquarii/user-account-manager
cd9eea5 daily dev 20190413
Sign up for freeto 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.

3 participants

@ezaquarii@nextcloud-android-bot@AndyScherzinger