CID-1261670 added null check

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

Branch: refs/heads/vmware-disk-controllers
Commit: 5251fb2dc33bc2f5a3e04fe8928ee0e8645b6647
Parents: 251e88c
Author: Daan Hoogland <d...@onecht.net>
Authored: Mon Jan 5 16:01:13 2015 +0100
Committer: Daan Hoogland <d...@onecht.net>
Committed: Mon Jan 5 16:01:13 2015 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/motion/AncientDataMotionStrategy.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5251fb2d/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
----------------------------------------------------------------------
diff --git 
a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
 
b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index 203cfa4..17ab00e 100644
--- 
a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ 
b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -190,7 +190,7 @@ public class AncientDataMotionStrategy implements 
DataMotionStrategy {
                     // for template, we want to leave it on cache for 
performance reason
                     if ((answer == null || !answer.getResult()) && 
srcForCopy.getRefCount() < 2) {
                         // cache object created by this copy, not already there
-                        s_logger.warn("Copy may not be handled correctly by 
agent(id: " + ep.getId() + ")." +
+                        s_logger.warn("Copy may not be handled correctly by 
agent(id: " + (ep != null ? ep.getId() : "\"unspecified\"") + ")." +
                                       " Delete " + cacheType + " cache(id: " + 
cacheId +
                                       ", uuid: " + cacheUuid + ")");
                         cacheMgr.deleteCacheObject(srcForCopy);

Reply via email to