cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karuturi <>
Subject [GitHub] cloudstack pull request: findbugs: ! equals instead of !=
Date Mon, 02 Nov 2015 10:04:44 GMT
Github user karuturi commented on a diff in the pull request:
    --- Diff: plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/
    @@ -296,7 +296,7 @@ private void setHttpHeader(final HttpMethodBase m) {
             m.setRequestHeader(CONTENT_TYPE, CONTENT_JSON);
             m.setRequestHeader(ACCEPT, CONTENT_JSON);
             m.setRequestHeader(HTTP_HEADER_INSTANCE_ID, CLOUDSTACK_INSTANCE_ID + "-" + zoneId);
    -        if (hash != "" ) {
    +        if (! "".equals(hash)) {
    --- End diff --
    I was guessing that the code intents to set the value only when it is not null and not
empty. with this code, when the hash value is null, it will still set the request header HASH_MATCH.
    isNotEmpty impl, you should send PR to commons lib :) we use at multiple places

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message