You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/11/29 09:39:52 UTC

[2/3] git commit: updated refs/heads/master to a1d2c53

CLOUDSTACK-8958: throw an exception if project account cannot be found


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

Branch: refs/heads/master
Commit: 89ce8bd9e289327f411790eb05a9fb49ef1f9a2f
Parents: 37301ed
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Wed Nov 4 09:57:44 2015 +0100
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Mon Nov 16 10:17:50 2015 +0100

----------------------------------------------------------------------
 .../src/com/cloud/configuration/ConfigurationManagerImpl.java  | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/89ce8bd9/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 4ecec3b..40fd256 100644
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -2618,6 +2618,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
             }
 
             vlanOwner = _accountMgr.getAccount(project.getProjectAccountId());
+            if (vlanOwner == null) {
+                throw new InvalidParameterValueException("Please specify a valid projectId");
+            }
         }
 
         Domain domain = null;
@@ -3329,6 +3332,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 throw new InvalidParameterValueException("Unable to find project by id " + projectId);
             }
             vlanOwner = _accountMgr.getAccount(project.getProjectAccountId());
+            if (vlanOwner == null) {
+                throw new InvalidParameterValueException("Please specify a valid projectId");
+            }
         }
 
         Domain domain = null;