Trilead-SSH2 fails with NPE when calling Connection#getReasonClosedCause()

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Jenkins 2.157, TrileadSSH build-217-jenkins-14

      Just caught it in SSH Slaves plugin tests on my local machine:

      Caused by: java.lang.NullPointerException
      	at com.trilead.ssh2.Connection.getReasonClosedCause(Connection.java:1556)
      	at hudson.plugins.sshslaves.SSHLauncher.reportTransportLoss(SSHLauncher.java:1420)
      	at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:1343)
      	at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:603)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Tirlead code does not check whether "this.tm" field is null before returning getReasonClosedCause from "this.tm". Just a minor defect

            Assignee:
            Oleg Nenashev
            Reporter:
            Oleg Nenashev
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: