cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/master to dfa612d
Date Thu, 18 Jul 2013 15:56:04 GMT
Updated Branches:
  refs/heads/master 876a7b336 -> dfa612d1f


CLOUDSTACK-3598: [Automation] NullPointerException observed while connecting agent

Description:

    Fixing an NPE when setting resource count.


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

Branch: refs/heads/master
Commit: dfa612d1fe538274deea27f8a10ce8352aa39e5b
Parents: 876a7b3
Author: Vijayendra Bhamidipati <vijayendra.bhamidipati@citrix.com>
Authored: Wed Jul 17 10:46:35 2013 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Thu Jul 18 08:55:57 2013 -0700

----------------------------------------------------------------------
 .../src/com/cloud/configuration/dao/ResourceCountDaoImpl.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dfa612d1/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java b/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
index cfd2137..9070ff9 100644
--- a/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
+++ b/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
@@ -98,7 +98,7 @@ public class ResourceCountDaoImpl extends GenericDaoBase<ResourceCountVO,
Long>
     @Override 
     public void setResourceCount(long ownerId, ResourceOwnerType ownerType, ResourceType
type, long count) {
         ResourceCountVO resourceCountVO = findByOwnerAndType(ownerId, ownerType, type);
-        if (count != resourceCountVO.getCount()) {
+        if (resourceCountVO != null && count != resourceCountVO.getCount()) {
             resourceCountVO.setCount(count);
             update(resourceCountVO.getId(), resourceCountVO);
         }


Mime
View raw message