Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/868#discussion_r147079416
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
 ---
    @@ -1492,7 +1503,7 @@ protected OsgiBundleInstallationResult 
addItemsOsgi(String yaml, boolean forceUp
     
             OsgiBundleInstallationResult result = null;
             try {
    -            result = osgiManager.get().install(null, new 
FileInputStream(bf), true, true, forceUpdate).get();
    +            result = osgiManager.get().install(new 
BasicManagedBundle(vn.getSymbolicName(), vn.getVersionString(), null), new 
FileInputStream(bf), true, true, forceUpdate).get();
    --- End diff --
    
    (Unrelated) Feels wrong that we pass into this method `Maybe<OsgiManager> 
osgiManager`, and then just call `osgiManager.get()` without checking it's 
present at all. Looking at its usage, the callers always check - so the method 
signature should be just `OsgiManager` instead of a maybe.


---

Reply via email to