title: Jenkins NextGeneration Warnings plugin: publishIssues fails with there's no @DataBoundConstructor
body: <p>Hi I am using a Jenkins pipeline file and i want to integrate the <a href="https://pmd.github.io/latest/pmd_userdocs_cpd.html" rel="nofollow noreferrer">cpd</a> tool. 
  Therefore I am using the NextGenerationWarnings Plugin and followed their <a href="https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md#advanced-pipeline-configuration" rel="nofollow noreferrer">docs</a> (See section Advanced Pipeline configuration). </p>
  
  <p>For testing purpose I added the call to the checkout stage.</p>
  
  <p><strong>Stage:</strong></p>
  
  <pre><code>stage ("Checkout") {
              cleanWs()
              echo "Using branch $BRANCH_NAME"
              def gitResult = checkout(scm)
              echo "${gitResult}"
              def myworkspace = pwd()
              sh "/var/lib/jenkins/pmd-bin-6.12.0/bin/run.sh cpd -failOnViolation false --minimum-tokens 70 --files $myworkspace/PROG --language cpp --format xml &gt; cpd.xml"
              def cpd = scanForIssues tool: cpd(pattern: 'cpd.xml')
              unzip publishIssues {issues: [cpd]}
          }
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <p>During Build I receive the following error message.</p>
  
  <blockquote>
    <p>[Pipeline] publishIssues </p>
    
    <p>[Pipeline] } </p>
    
    <p>[Pipeline] // stage </p>
    
    <p>[Pipeline] echo</p>
    
    <p>ERROR: java.lang.IllegalArgumentException: Could not instantiate
    {issues=org.jenkinsci.plugins.workflow.cps.CpsClosure2@2c319167} for
    PublishIssuesStep(issues:
    org.kohsuke.stapler.NoStaplerConstructorException: There's no
    @DataBoundConstructor on any constructor of class
    io.jenkins.plugins.analysis.core.steps.AnnotatedReport[],
    failedNewAll?(deprecated): int, failedNewHigh?(deprecated): int,
    failedNewLow?(deprecated): int, failedNewNormal?(deprecated): int,
    failedTotalAll?(deprecated): int, failedTotalHigh?(deprecated): int,
    failedTotalLow?(deprecated): int, failedTotalNormal?(deprecated): int,
    healthy?: int, id?: String, ignoreFailedBuilds?: boolean,
    ignoreQualityGate?: boolean, minimumSeverity?: String, name?: String,
    qualityGates?: QualityGate(threshold: int, type:
    QualityGateType[TOTAL, TOTAL_ERROR, TOTAL_HIGH, TOTAL_NORMAL,
    TOTAL_LOW, NEW, NEW_ERROR, NEW_HIGH, NEW_NORMAL, NEW_LOW, DELTA,
    DELTA_ERROR, DELTA_HIGH, DELTA_NORMAL, DELTA_LOW], unstable:
    boolean)[], referenceJobName?: String, sourceCodeEncoding?: String,
    unhealthy?: int, unstableNewAll?(deprecated): int,
    unstableNewHigh?(deprecated): int, unstableNewLow?(deprecated): int,
    unstableNewNormal?(deprecated): int, unstableTotalAll?(deprecated):
    int, unstableTotalHigh?(deprecated): int,
    unstableTotalLow?(deprecated): int, unstableTotalNormal?(deprecated):
    int): java.lang.ClassCastException:
    io.jenkins.plugins.analysis.core.steps.PublishIssuesStep.issues
    expects
    java.util.List
    but received class org.jenkinsci.plugins.workflow.cps.CpsClosure2</p>
  </blockquote>
  
  <p>I am not sure what the <code>@DataBoundConstructor</code> annotation does, but could that be related to an outdated java version? </p>