Repository: brooklyn-server
Updated Branches:
  refs/heads/master 57b9d7270 -> 30292c967


Check versionedName to avoid NPE.

Fixes break from https://github.com/apache/brooklyn-server/pull/672,
I merged without re-running unit tests :-(


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

Branch: refs/heads/master
Commit: c545381152a22df29d16c063fd6cd2fab4ec7b33
Parents: 57b9d72
Author: Geoff Macartney <[email protected]>
Authored: Tue Jun 6 17:15:10 2017 +0100
Committer: Geoff Macartney <[email protected]>
Committed: Tue Jun 6 17:15:10 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/rest/resources/CatalogResource.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c5453811/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/CatalogResource.java
----------------------------------------------------------------------
diff --git 
a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/CatalogResource.java
 
b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/CatalogResource.java
index 2657c54..2d7487d 100644
--- 
a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/CatalogResource.java
+++ 
b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/CatalogResource.java
@@ -171,7 +171,7 @@ public class CatalogResource extends 
AbstractBrooklynRestResource implements Cat
         public static BundleInstallationRestResult 
of(OsgiBundleInstallationResult in, ManagementContext mgmt, 
BrooklynRestResourceUtils brooklynU, UriInfo ui) {
             BundleInstallationRestResult result = new 
BundleInstallationRestResult();
             result.message = in.getMessage();
-            result.bundle = in.getMetadata().getVersionedName().toString();
+            result.bundle = in.getVersionedName() != null ? 
in.getVersionedName().toString() : "";
             result.code = in.getCode();
             if (in.getCatalogItemsInstalled()!=null) {
                 result.types = MutableMap.of();

Reply via email to