You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2014/07/29 21:32:18 UTC

[23/31] git commit: prevent NPE due to applicationName being null

prevent NPE due to applicationName being null


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

Branch: refs/heads/master
Commit: 08a91f61c83fabe2dacafc9176423db988207e64
Parents: 8f2a694
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Wed Jul 23 16:56:14 2014 -0700
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Tue Jul 29 14:40:46 2014 -0400

----------------------------------------------------------------------
 .../src/main/java/brooklyn/management/usage/ApplicationUsage.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/08a91f61/core/src/main/java/brooklyn/management/usage/ApplicationUsage.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/management/usage/ApplicationUsage.java b/core/src/main/java/brooklyn/management/usage/ApplicationUsage.java
index 7f78807..cf72791 100644
--- a/core/src/main/java/brooklyn/management/usage/ApplicationUsage.java
+++ b/core/src/main/java/brooklyn/management/usage/ApplicationUsage.java
@@ -66,7 +66,8 @@ public class ApplicationUsage {
 
     public ApplicationUsage(String applicationId, String applicationName, String entityType, Map<String, String> metadata) {
         this.applicationId = checkNotNull(applicationId, "applicationId");
-        this.applicationName = checkNotNull(applicationName, "applicationName");
+        // allow name to be null, happens in certain failed rebind cases
+        this.applicationName = applicationName;
         this.entityType = checkNotNull(entityType, "entityType");
         this.metadata = checkNotNull(metadata, "metadata");
     }