From 5251fb2dc33bc2f5a3e04fe8928ee0e8645b6647 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Mon, 5 Jan 2015 16:01:13 +0100 Subject: [PATCH] CID-1261670 added null check --- .../cloudstack/storage/motion/AncientDataMotionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 203cfa459d1..17ab00e1e38 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);