Skip to content

Commit c905724

Browse files
geomacyRobert Moss
authored andcommitted
Check versionedName to avoid NPE.
Fixes break from apache#672, I merged without re-running unit tests :-(
1 parent ad27442 commit c905724

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/CatalogResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public String getMessage() {
171171
public static BundleInstallationRestResult of(OsgiBundleInstallationResult in, ManagementContext mgmt, BrooklynRestResourceUtils brooklynU, UriInfo ui) {
172172
BundleInstallationRestResult result = new BundleInstallationRestResult();
173173
result.message = in.getMessage();
174-
result.bundle = in.getMetadata().getVersionedName().toString();
174+
result.bundle = in.getVersionedName() != null ? in.getVersionedName().toString() : "";
175175
result.code = in.getCode();
176176
if (in.getCatalogItemsInstalled()!=null) {
177177
result.types = MutableMap.of();

0 commit comments

Comments
 (0)