You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/07/27 14:43:41 UTC
[2/4] git commit: updated refs/heads/master to 22f194b
coverity 1133705: output writer close
Signed-off-by: Daan Hoogland <da...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b350c37
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b350c37
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b350c37
Branch: refs/heads/master
Commit: 8b350c37bd7b35234829c4709565eb339d99c2d5
Parents: 488ee88
Author: Daan Hoogland <da...@onecht.net>
Authored: Fri Jul 17 15:47:39 2015 +0200
Committer: Daan Hoogland <da...@gmail.com>
Committed: Mon Jul 27 14:43:11 2015 +0200
----------------------------------------------------------------------
server/src/com/cloud/server/ConfigurationServerImpl.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b350c37/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 288eeeb..e7a928a 100644
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -650,11 +650,11 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
} else { // !keystoreFile.exists() and dbExisted
// Export keystore to local file
byte[] storeBytes = Base64.decodeBase64(dbString);
- try {
- String tmpKeystorePath = "/tmp/tmpkey";
- FileOutputStream fo = new FileOutputStream(tmpKeystorePath);
+ String tmpKeystorePath = "/tmp/tmpkey";
+ try (
+ FileOutputStream fo = new FileOutputStream(tmpKeystorePath);
+ ) {
fo.write(storeBytes);
- fo.close();
Script script = new Script(true, "cp", 5000, null);
script.add("-f");
script.add(tmpKeystorePath);