-
Notifications
You must be signed in to change notification settings - Fork 95
Harden CapabilityBooleanType: can never be null #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/main/java/com/owncloud/android/lib/resources/status/CapabilityBooleanType.java
Show resolved
Hide resolved
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
|
29eaff8 to
91661b8
Compare
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
91661b8 to
b66112f
Compare
|
Complexity increasing per file
==============================
- src/test/java/com/owncloud/android/lib/resources/status/CapabilityBooleanTypeTest.java 1
See the complete overview on Codacy |
Lint
SpotBugs (new)
SpotBugs (master)
|
| return TRUE; | ||
| } | ||
| return null; | ||
| return UNKNOWN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here UNKNOWN.getValue() or maybe UNKNOWN.value, same for the other checks
|
@tobiasKaminsky been nitpicking a bit, feel free to skip my latest comments or apply them :) |
Fix nextcloud/android#5045
Signed-off-by: tobiasKaminsky tobias@kaminsky.me