Merge pull request #878 from borisroman/CLOUDSTACK-8890

[4.6][BLOCKER]CLOUDSTACK-8890: Added isEmpty() check to prevent 
nullPointerException.Check if the list is empty before trying to get the first 
entry. If the list is empty, in example when dealing with projects, it will 
user the caller user id.

Tests to verify working order:
1. Deploy ACS
2. Create project
3. Create resource in project -> Should succeed!

* pr/878:
  Added isEmpty() check to prevent nullPointerException.

Signed-off-by: Wido den Hollander <[email protected]>


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

Branch: refs/heads/master
Commit: 73c7ad9a4a409cba7f897c848145cbc7f6f96ae4
Parents: a0f8f56 80cb3ad
Author: Wido den Hollander <[email protected]>
Authored: Wed Sep 23 16:04:35 2015 +0200
Committer: Wido den Hollander <[email protected]>
Committed: Wed Sep 23 16:04:35 2015 +0200

----------------------------------------------------------------------
 .../src/com/cloud/network/lb/LoadBalanceRuleHandler.java       | 6 +++++-
 .../network/lb/InternalLoadBalancerVMManagerImpl.java          | 6 +++++-
 .../network/contrail/management/ServiceManagerImpl.java        | 6 +++++-
 server/src/com/cloud/network/router/NetworkHelperImpl.java     | 6 +++++-
 server/src/com/cloud/vm/UserVmManagerImpl.java                 | 5 ++++-
 5 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


Reply via email to