findbugs: instead of !=, use string utils
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9a798c53 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9a798c53 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9a798c53 Branch: refs/heads/master Commit: 9a798c537eaeca45118724209c4136e838255b08 Parents: ea7c2d9 Author: Daan Hoogland <[email protected]> Authored: Tue Sep 15 20:36:53 2015 +0200 Committer: Daan Hoogland <[email protected]> Committed: Mon Nov 16 18:30:36 2015 +0100 ---------------------------------------------------------------------- .../src/com/cloud/network/bigswitch/BigSwitchBcfApi.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a798c53/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfApi.java ---------------------------------------------------------------------- diff --git a/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfApi.java b/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfApi.java index 16cb3f7..2e9c0fa 100644 --- a/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfApi.java +++ b/plugins/network-elements/bigswitch/src/com/cloud/network/bigswitch/BigSwitchBcfApi.java @@ -47,6 +47,7 @@ import org.apache.commons.httpclient.methods.PutMethod; import org.apache.commons.httpclient.methods.StringRequestEntity; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import com.google.gson.Gson; @@ -296,7 +297,7 @@ public class BigSwitchBcfApi { m.setRequestHeader(CONTENT_TYPE, CONTENT_JSON); m.setRequestHeader(ACCEPT, CONTENT_JSON); m.setRequestHeader(HTTP_HEADER_INSTANCE_ID, CLOUDSTACK_INSTANCE_ID + "-" + zoneId); - if (hash != "" ) { + if (StringUtils.isNotEmpty(hash)) { m.setRequestHeader(HASH_MATCH, hash); }
