incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [16/50] git commit: refs/heads/ui-multiple-vlan-ranges - CLOUDSTACK-1621: listProjectInvitations fails with NPE for valid requests.
Date Wed, 13 Mar 2013 22:22:07 GMT
CLOUDSTACK-1621: listProjectInvitations fails with NPE for valid requests.


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

Branch: refs/heads/ui-multiple-vlan-ranges
Commit: bab6839f38262a228da6c9a193972cf6def2616a
Parents: 85e9d63
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Mar 11 11:48:23 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Mar 11 13:07:12 2013 -0700

----------------------------------------------------------------------
 .../query/dao/ProjectInvitationJoinDaoImpl.java    |    4 +++-
 .../api/query/vo/ProjectInvitationJoinVO.java      |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bab6839f/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
index ca0f171..1dfed34 100644
--- a/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ProjectInvitationJoinDaoImpl.java
@@ -56,7 +56,9 @@ public class ProjectInvitationJoinDaoImpl extends GenericDaoBase<ProjectInvitati
         response.setId(invite.getUuid());
         response.setProjectId(invite.getProjectUuid());
         response.setProjectName(invite.getProjectName());
-        response.setInvitationState(invite.getState().toString());
+        if (invite.getState() != null) {
+            response.setInvitationState(invite.getState().toString());
+        }
 
         if (invite.getAccountName() != null) {
             response.setAccountName(invite.getAccountName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bab6839f/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java b/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
index a60c937..f6e6760 100644
--- a/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
@@ -25,8 +25,9 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
+import com.cloud.projects.ProjectInvitation.State;
 import com.cloud.utils.db.GenericDao;
-import com.cloud.vm.VirtualMachine.State;
+
 
 @Entity
 @Table(name="project_invitation_view")


Mime
View raw message