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

Publisher - Code Analysis - NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: analysis-core-plugin
    • Labels:
    • Environment:
      - Static Code Analysis Plug-ins (id: analysis-core, wersja: 1.36)
      - Static Analysis Collector Plug-in 1.19
      - Jenkins 1.444

      Description

      Again in latest version there is a bug during publishing with analysis-core plugin.

      Cause:
      In section "Post-build Actions" of job configuration (type: maven), when "Publish combined analysis results" checked, the value of "Health priorities" (e.g. All priorities) is not remembered after save action (probably only in a form, no in stored a job configuration - there is ok).

      To reproduce (changes in job configuration):

      • check "Post-build Actions" -> "Publish combined analysis results"
      • use advanced settings and select "Health priorities" -> "All priorities"
      • use save action
      • build (should be BUILD SUCCESSFUL, config_correct.xml)
      • edit configuration again, there should be any value selected in path: "Post-build Actions" -> "Publish combined analysis results" -> "Health priorities" (bug_analysis_core_nullpointerexception.jpg)
      • use save action
      • build (should be FAILURE, config_wrong.xml)

      ERROR: Publisher hudson.plugins.analysis.collector.AnalysisPublisher aborted due to exception
      java.lang.NullPointerException: Name is null
      at java.lang.Enum.valueOf(Enum.java:195)
      at hudson.plugins.analysis.util.model.Priority.valueOf(Priority.java:18)
      at hudson.plugins.analysis.core.HealthAwarePublisher.getMinimumPriority(HealthAwarePublisher.java:618)
      at hudson.plugins.analysis.core.AbstractHealthDescriptor.<init>(AbstractHealthDescriptor.java:36)
      at hudson.plugins.analysis.collector.AnalysisHealthDescriptor.<init>(AnalysisHealthDescriptor.java:25)
      at hudson.plugins.analysis.collector.AnalysisResultAction.<init>(AnalysisResultAction.java:31)
      at hudson.plugins.analysis.collector.AnalysisPublisher.perform(AnalysisPublisher.java:256)
      at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:1014)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
      at hudson.model.Run.run(Run.java:1429)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)

      1. config_correct.xml
        11 kB
        Marcin Drozdowski
      2. config_wrong.xml
        11 kB
        Marcin Drozdowski
      3. installed.html
        29 kB
        Marcin Drozdowski
      4. installed2.html
        26 kB
        Marcin Drozdowski
      1. bug_analysis_core_nullpointerexception.jpg
        43 kB
      2. bug_analysis_core_nullpointerexception.jpg
        42 kB

        Issue Links

          Activity

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              thinking Marcin Drozdowski
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: