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

New PluginWrapper#getDeprecations triggers NPE under certain conditions

XMLWordPrintable

      Support-core test SupportActionTest#takeSnapshotAndMakeSureSomethingHappens fails with:

       14.956 [id=20]        WARNING c.c.j.support.SupportPlugin#appendManifestContents: Could not get content from Administrative monitors for support bundle
      java.lang.NullPointerException
              at hudson.PluginWrapper.getDeprecations(PluginWrapper.java:1310)
              at hudson.PluginWrapper.isDeprecated(PluginWrapper.java:379)
              at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
              at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
              at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
              at hudson.PluginManager$PluginDeprecationMonitor.getDeprecatedPlugins(PluginManager.java:2264)
              at hudson.PluginManager$PluginDeprecationMonitor.isActivated(PluginManager.java:2258)
              at com.cloudbees.jenkins.support.impl.AdministrativeMonitors.addContents(AdministrativeMonitors.java:67)
      
      

      It's because this commit https://github.com/jenkinsci/jenkins/commit/d213ef962cb818a2b244b374cdc518133bbe6d32#diff-dd00e0527600a2b32c10fe2d5af188adR1310 added to 2.246 onwards.

      The root cause is site.getData() is null. Only a null check is needed.

      Does it deserve be included in 2.249.1 backport?

            mramonleon Ramon Leon
            mramonleon Ramon Leon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: