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: JcloudsSshMachineLocation: avoid NPE...
Date Tue, 29 Mar 2016 14:02:38 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/88#discussion_r57727699
  
    --- Diff: locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsSshMachineLocation.java
---
    @@ -162,8 +162,12 @@ public void init() {
         @Override
         public void rebind() {
             super.rebind();
    -        ComputeServiceContext context = jcloudsParent.getComputeService().getContext();
    -        runScriptFactory = context.utils().injector().getInstance(RunScriptOnNode.Factory.class);
    +        
    +        if (jcloudsParent != null) {
    +            // can be null on rebind, if location has been "orphaned" somehow
    +            ComputeServiceContext context = jcloudsParent.getComputeService().getContext();
    +            runScriptFactory = context.utils().injector().getInstance(RunScriptOnNode.Factory.class);
    +        }
    --- End diff --
    
    The problem is the bug happened a long time ago, to persist these locations (or more likely
not delete them when the parent was deleted). I'm hoping that's fixed but it might not be.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message