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

Bitbucket Push and Pull Request plugin hijacks System.err

XMLWordPrintable

      As seen in JENKINS-67900, the Bitbucket Push and Pull Request plugin replaces System.err (Oracle javadoc) with a PrintStream that redirects all output to the logger of io.jenkins.plugins.bitbucketpushandpullrequest.common.BitBucketPPRUtils, even if the output originally had nothing to do with this plugin. That prevents the output from going to the original error log file and misleads the user into believing that the logged error was somehow caused by this plugin.

      The errors are logged by the PrintStream created by BitBucketPPRUtils.createLoggingProxyForErrors. Static initialization blocks in BitBucketPPRJobProbe, BitBucketPPRTrigger, and BitBucketPPREnvironmentContributor set that PrintStream as the System.err stream. The original System.err stream is lost.

            cdelmonte Christian Del Monte
            kon Kalle Niemitalo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: