cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/3] git commit: updated refs/heads/master to a1d2c53
Date Sun, 29 Nov 2015 08:39:52 GMT
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.zhou@tech.leaseweb.com>
Authored: Wed Nov 4 09:57:44 2015 +0100
Committer: Wei Zhou <w.zhou@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;


Mime
View raw message