cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [2/15] git commit: rbd: Fix nullPointerException
Date Mon, 02 Jul 2012 12:17:34 GMT
rbd: Fix nullPointerException

When no authorization is set for the pool we can't check if the String is empty()

So we check if it's not null


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/9371a5fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/9371a5fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/9371a5fd

Branch: refs/heads/rbd
Commit: 9371a5fd1e07b91f2bb1e6be6786c7ab51a58d7d
Parents: ba71643
Author: Wido den Hollander <wido@widodh.nl>
Authored: Mon Jul 2 14:13:02 2012 +0200
Committer: Wido den Hollander <wido@widodh.nl>
Committed: Mon Jul 2 14:13:02 2012 +0200

----------------------------------------------------------------------
 .../com/cloud/agent/storage/KVMPhysicalDisk.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9371a5fd/agent/src/com/cloud/agent/storage/KVMPhysicalDisk.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/storage/KVMPhysicalDisk.java b/agent/src/com/cloud/agent/storage/KVMPhysicalDisk.java
index bb5834c..cb790d9 100644
--- a/agent/src/com/cloud/agent/storage/KVMPhysicalDisk.java
+++ b/agent/src/com/cloud/agent/storage/KVMPhysicalDisk.java
@@ -40,7 +40,7 @@ public class KVMPhysicalDisk {
 
         rbdOpts = "rbd:" + image;
         rbdOpts += ":mon_host=" + monHost + "\\\\:" + monPort;
-        if (authUserName.isEmpty()) {
+        if (authUserName == null) {
             rbdOpts += ":auth_supported=none";
         } else {
             rbdOpts += ":auth_supported=cephx";


Mime
View raw message