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

NPE on CopyArtifact.java line 441 if the job config XML is missing <target>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • copyartifact-plugin
    • None

      CopyArtifact 1.4.1 will crash with a NullPointerException on CopyArtifact.java line 441 if the job config XML is missing <target>. This is a problem because JJB version =2.0.0.0b3.201803131321 doesn't write that tag if "target: null".

      This should be easily fixable if we can modify and test the Copy Artifact plugin on Jenkins.

      The crashing line of code is:
      if (target.length() > 0) targetDir = new FilePath(targetDir, env.expand(target));

            ikedam ikedam
            darrelvun Darrel Vuncannon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: