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

    https://github.com/apache/brooklyn-server/pull/88#discussion_r57678237
  
    --- 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 --
    
    Won't this cause NPE down the line when trying to execute scripts?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to