cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [2/5] git commit: api: Fix NullPointerException for listProjects in ProjectJoinDaoImpl
Date Wed, 19 Dec 2012 01:44:46 GMT
api: Fix NullPointerException for listProjects in ProjectJoinDaoImpl

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>


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

Branch: refs/heads/api_refactoring
Commit: a9df2cb0f53d5d6b8d5837dac220a264d1023d1d
Parents: 4342580
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Tue Dec 18 17:41:01 2012 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Tue Dec 18 17:44:18 2012 -0800

----------------------------------------------------------------------
 .../cloud/api/query/dao/ProjectJoinDaoImpl.java    |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a9df2cb0/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
index a2aaa21..3663e07 100644
--- a/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ProjectJoinDaoImpl.java
@@ -59,8 +59,9 @@ public class ProjectJoinDaoImpl extends GenericDaoBase<ProjectJoinVO,
Long> impl
         response.setId(proj.getUuid());
         response.setName(proj.getName());
         response.setDisplaytext(proj.getDisplayText());
-        response.setState(proj.getState().toString());
-
+        if (proj.getState() != null) {
+            response.setState(proj.getState().toString());
+        }
         response.setDomainId(proj.getDomainUuid());
         response.setDomain(proj.getDomainName());
 


Mime
View raw message