You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2015/01/13 10:34:50 UTC

[6/7] git commit: updated refs/heads/vmware-disk-controllers to 06d4458

CID-1257434 try with resource


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

Branch: refs/heads/vmware-disk-controllers
Commit: 9239f93a7d16b1b36b0a9a72edfeec72f366b0af
Parents: 1a7f76a
Author: Daan Hoogland <da...@onecht.net>
Authored: Mon Jan 12 15:09:16 2015 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Jan 12 20:37:21 2015 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/resource/NfsSecondaryStorageResource.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9239f93a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 55f80e1..1b3dc83 100644
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -739,8 +739,8 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
             metaFile.delete();
             uniqDir.delete();
             String md5sum = null;
-            try {
-                md5sum = DigestUtils.md5Hex(new FileInputStream(file));
+            try (FileInputStream fs = new FileInputStream(file)){
+                md5sum = DigestUtils.md5Hex(fs);
             } catch (IOException e) {
                 s_logger.debug("Failed to get md5sum: " + file.getAbsoluteFile());
             }