-
Notifications
You must be signed in to change notification settings - Fork 53
Check versionedName to avoid NPE. #719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes break from apache#672, I merged without re-running unit tests :-(
|
LGTM, will wait for the tests to pass and merge. |
|
Hm, build fails with same error - I can't reproduce that however. I did reproduce the original error, then built everything successfully after making the change above. Odd... |
|
Hm very strange - it looks as if the test hasn't pulled the change, see Copying the relevant lines as the above will be thrown away on next rebuild: @SuppressWarnings("deprecation")
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.code = in.getCode();
if (in.getCatalogItemsInstalled()!=null) {
result.types = MutableMap.of();
for (String id: in.getCatalogItemsInstalled()) {
// TODO prefer to use RegisteredType, but we need transformer for those in REST
//RegisteredType ci = mgmt.getTypeRegistry().get(id);
CatalogItem<?, ?> ci = CatalogUtils.getCatalogItemOptionalVersion(mgmt, id);
CatalogItemSummary summary = CatalogTransformer.catalogItemSummary(brooklynU, ci, ui.getBaseUriBuilder());
result.types.put(id, summary);
}
}
return result;
}Note the line which doesn't include the change linked above. |
|
retest this please |
|
retest this please, after deleting the workspace |
|
Tests pass locally, merging. Will investigate jenkins issue separately. |
|
Looks like it is fetching the apache master instead of the branch from my fork, as below. Note rather than from From build log: |
Fixes break from #672,
I merged without re-running unit tests :-(