-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Warning hunt in org.openhab.core.addon.xxx #4489
Warning hunt in org.openhab.core.addon.xxx #4489
Conversation
Signed-off-by: Gaël L'hopital <[email protected]>
...g/openhab/core/addon/marketplace/internal/community/CommunityTransformationAddonHandler.java
Show resolved
Hide resolved
LGTM, thanks. Reducing warnings is always appreciated. 👍 Though, I think due to the code freeze, this PR might be delayed until 4.3 is released. |
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.
LGTM
Long localQualifier = qualifier; | ||
if (localQualifier == null) { // we are the release |
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.
Nitty gritty: The naming seems inconsistent compared to otherQualifier
below. For otherQualifier
the semantic is different because other
refers to quality
in other
rather than in this
, whereas local
refers to the variable being in local scope (I presume). localQualifier
and localOtherQualifier
seems maybe a bit too much, so perhaps simply thisQualifier
and otherQualifier
?
Long localQualifier = qualifier; | |
if (localQualifier == null) { // we are the release | |
Long thisQualifier = qualifier; | |
if (thisQualifier == null) { // we are the release |
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.
Changed
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.
LGTM.
return -1; | ||
} | ||
|
||
// both versions are milestones, we can compare them | ||
return Long.compare(qualifier, other.qualifier); | ||
return Long.compare(localQualifier, otherQualifier); |
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.
return Long.compare(localQualifier, otherQualifier); | |
return Long.compare(thisQualifier, otherQualifier); |
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.
Accordingly also
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.
LGTM.
Signed-off-by: Gaël L'hopital <[email protected]>
Minus 19 warnings