brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #868: allow types from different bundles if equ...
Date Thu, 26 Oct 2017 10:18:35 GMT
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.


---

Mime
View raw message