cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dar...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 0ec6b9a
Date Wed, 06 Nov 2013 16:51:20 GMT
Updated Branches:
  refs/heads/master 56070c644 -> 0ec6b9ac9


Missed a null check


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

Branch: refs/heads/master
Commit: 68ce3f56ac9048071892ce47a1da984768fbde55
Parents: 56070c6
Author: Darren Shepherd <darren.s.shepherd@gmail.com>
Authored: Wed Nov 6 09:43:57 2013 -0700
Committer: Darren Shepherd <darren.s.shepherd@gmail.com>
Committed: Wed Nov 6 09:44:08 2013 -0700

----------------------------------------------------------------------
 utils/src/com/cloud/utils/db/DbProperties.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/68ce3f56/utils/src/com/cloud/utils/db/DbProperties.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/DbProperties.java b/utils/src/com/cloud/utils/db/DbProperties.java
index a5ad383..55df23d 100644
--- a/utils/src/com/cloud/utils/db/DbProperties.java
+++ b/utils/src/com/cloud/utils/db/DbProperties.java
@@ -65,12 +65,15 @@ public class DbProperties {
                 if ( is == null ) {
                     is = PropertiesUtil.openStreamFromURL("db.properties");
                 }
+
                 if ( is == null ) {
                     System.err.println("Failed to find db.properties");
                     log.error("Failed to find db.properties");
                 }
 
-                dbProps.load(is);
+                if ( is != null ) {
+                    dbProps.load(is);
+                }
 
                 EncryptionSecretKeyChecker checker = new EncryptionSecretKeyChecker();
                 checker.check(dbProps);


Mime
View raw message