You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/10/29 04:53:11 UTC
[21/50] [abbrv] git commit: updated refs/heads/object_store_migration
to 5ec2a44
InputStream use fix in ProcessUtil
- use PropertiesUtil to load Properties from file
Signed-off-by: Laszlo Hornyak <la...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fa35490f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fa35490f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fa35490f
Branch: refs/heads/object_store_migration
Commit: fa35490fef785ae3963c428e7a3d3f9471382ebc
Parents: dbaa818
Author: Laszlo Hornyak <la...@gmail.com>
Authored: Fri Oct 25 21:49:16 2013 +0200
Committer: Laszlo Hornyak <la...@gmail.com>
Committed: Sat Oct 26 17:47:34 2013 +0200
----------------------------------------------------------------------
utils/src/com/cloud/utils/ProcessUtil.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fa35490f/utils/src/com/cloud/utils/ProcessUtil.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/ProcessUtil.java b/utils/src/com/cloud/utils/ProcessUtil.java
index e64c931..eee4ab5 100644
--- a/utils/src/com/cloud/utils/ProcessUtil.java
+++ b/utils/src/com/cloud/utils/ProcessUtil.java
@@ -17,7 +17,6 @@
package com.cloud.utils;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
@@ -44,10 +43,8 @@ public class ProcessUtil {
s_logger.debug("environment.properties could not be opened");
}
else {
- final FileInputStream finputstream = new FileInputStream(propsFile);
final Properties props = new Properties();
- props.load(finputstream);
- finputstream.close();
+ PropertiesUtil.loadFromFile(props, propsFile);
dir = props.getProperty("paths.pid");
if (dir == null) {
dir = pidDir==null?"/var/run":pidDir;