Conversation
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12483.apk |
|
IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/12483-IT |
|
Issues
======
- Added 6
Complexity increasing per file
==============================
- src/themedWhite/java/com/owncloud/android/utils/PushUtils.java 19
- src/themedWhite/java/com/owncloud/android/services/firebase/NCFirebaseInstanceIDService.java 2
- src/themedWhite/java/com/owncloud/android/services/firebase/NCFirebaseMessagingService.java 3
- src/themedWhite/java/com/owncloud/android/utils/SecurityUtils.java 1
- src/themedWhite/java/com/owncloud/android/utils/GooglePlayUtils.java 3
- src/themedWhite/java/com/owncloud/android/authentication/ModifiedAuthenticatorActivity.java 1
See the complete overview on Codacy |
| .run(); | ||
|
|
||
| if (resultProxy.isSuccess()) { | ||
| PushConfigurationState pushArbitraryData = new PushConfigurationState(token, |
There was a problem hiding this comment.
Issue found: Avoid instantiating new objects inside loops
| accountPushData = gson.fromJson(providerValue, | ||
| PushConfigurationState.class); | ||
| } else { | ||
| accountPushData = null; |
There was a problem hiding this comment.
| getClientFor(ocAccount, context); | ||
|
|
||
| RemoteOperationResult remoteOperationResult = | ||
| new RegisterAccountDeviceForNotificationsOperation(pushTokenHash, |
There was a problem hiding this comment.
Issue found: Avoid instantiating new objects inside loops
| signature = Signature.getInstance("SHA512withRSA"); | ||
| if (accounts.length > 0) { | ||
| for (Account account : accounts) { | ||
| if (!TextUtils.isEmpty(arbitraryValue = arbitraryDataProvider.getValue(account, KEY_PUSH))) { |
| if (remoteOperationResult.isSuccess()) { | ||
| PushResponse pushResponse = remoteOperationResult.getPushResponseData(); | ||
|
|
||
| RemoteOperationResult resultProxy = new RegisterAccountDeviceForProxyOperation( |
There was a problem hiding this comment.
Issue found: Avoid instantiating new objects inside loops
| !accountPushData.isShouldBeDeleted() || | ||
| TextUtils.isEmpty(providerValue)) { | ||
| try { | ||
| OwnCloudAccount ocAccount = new OwnCloudAccount(account, context); |
There was a problem hiding this comment.
Issue found: Avoid instantiating new objects inside loops
46ae569 to
484a2b6
Compare
484a2b6 to
0342c47
Compare

Test for #5383
Needs pedrovgs/Shot#77
Testing
Writing tests is very important. Please try to write some tests for your PR.
If you need help, please do not hesitate to ask in this PR for help.