diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java index 4ec135b0740..246089b2a72 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java @@ -213,7 +213,7 @@ public class Application { this.user = user; } - public void setScreenShotCount (int screenShotCount) { + public void setScreenShotCount(int screenShotCount) { this.screenShotCount = screenShotCount; } @@ -223,7 +223,11 @@ public class Application { @Override public String toString() { - return "UUID : " + uuid + "\tName : " + name + "\tShort Description : " - + shortDescription + "\tLifecycle State : " + currentLifecycle.getLifecycleState(); + String app = "UUID : " + uuid + "\tName : " + name + "\tShort Description : " + + shortDescription; + if (currentLifecycle != null) { + app += "\tLifecycle State : " + currentLifecycle.getLifecycleState(); + } + return app; } }