Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57986

NPE doTestConnection

    XMLWordPrintable

Details

    Description

      Currently, for any error in doTestConnection, the code in catch, RocketChatNotifier.java, l599.

      However, in this catch, the following condition is incorrect.

      if (e.getCause() != null &&
      e.getCause().getClass() == SSLHandshakeException.class || e.getCause().getClass() == ValidatorException.class)

      Indeed, the third part of this, is not protect by the first part. In other terms, we can have an NPE when e.getCause() returns null because the condition "e.getCause().getClass() == ValidatorException.class" is eval.

      Attachments

        Activity

          mreinhardt Martin Reinhardt added a comment - already fixed: https://github.com/jenkinsci/rocketchatnotifier-plugin/commit/963d0fa60f33838f2947ae46bef40e3739121db0 Next time would appreciate PR for this kind of issue

          fixed in 1.4.4

          mreinhardt Martin Reinhardt added a comment - fixed in 1.4.4

          People

            Unassigned Unassigned
            gigaga Dam Guerin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: