Harden CapabilityBooleanType: can never be null#452
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
==========================================
+ Coverage 39.44% 39.50% +0.06%
==========================================
Files 136 136
Lines 5895 5895
Branches 771 771
==========================================
+ Hits 2325 2329 +4
+ Misses 3226 3218 -8
- Partials 344 348 +4
|
AndyScherzinger
previously approved these changes
Jun 9, 2020
tobiasKaminsky
force-pushed
the
cbtNonNull
branch
from
June 9, 2020 14:47
29eaff8 to
91661b8
Compare
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky
force-pushed
the
cbtNonNull
branch
from
June 9, 2020 14:53
91661b8 to
b66112f
Compare
Collaborator
|
Complexity increasing per file
==============================
- src/test/java/com/owncloud/android/lib/resources/status/CapabilityBooleanTypeTest.java 1
See the complete overview on Codacy |
Collaborator
Lint
SpotBugs (new)
SpotBugs (master)
|
| return TRUE; | ||
| } | ||
| return null; | ||
| return UNKNOWN; |
Member
There was a problem hiding this comment.
for the key you could then just go for UNKNOWN.getValue() etc. instead of duplicating the int-values here :)
|
|
||
| public boolean isUnknown(){ | ||
| public boolean isUnknown() { | ||
| return getValue() == -1; |
Member
There was a problem hiding this comment.
same here UNKNOWN.getValue() or maybe UNKNOWN.value, same for the other checks
Member
|
@tobiasKaminsky been nitpicking a bit, feel free to skip my latest comments or apply them :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix nextcloud/android#5045
Signed-off-by: tobiasKaminsky tobias@kaminsky.me