Skip to content
Permalink
Browse files

[JENKINS-17680] Make minimized diffs.

  • Loading branch information...
ikedam committed Aug 3, 2013
1 parent 7214a14 commit bc9cc1894ac32934b912b004784c8ad92fa5ae19
Showing with 14 additions and 13 deletions.
  1. +14 −13 src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
@@ -162,21 +162,22 @@ public boolean isOptional() {

/* package scope */
boolean upgradeIfNecessary(AbstractProject<?,?> job) throws IOException {
if (!isUpgradeNeeded()) {
return false;
}
int i = projectName.lastIndexOf('/');
if (i != -1 && projectName.indexOf('=', i) != -1 && /* not matrix */Jenkins.getInstance().getItem(projectName, job.getParent(), Job.class) == null) {
project = projectName.substring(0, i);
parameters = projectName.substring(i + 1);
if (isUpgradeNeeded()) {
int i = projectName.lastIndexOf('/');
if (i != -1 && projectName.indexOf('=', i) != -1 && /* not matrix */Jenkins.getInstance().getItem(projectName, job.getParent(), Job.class) == null) {
project = projectName.substring(0, i);
parameters = projectName.substring(i + 1);
} else {
project = projectName;
parameters = null;
}
Logger.getLogger(CopyArtifact.class.getName()).log(Level.INFO, "Split {0} into {1} with parameters {2}", new Object[] {projectName, project, parameters});
projectName = null;
job.save();
return true;
} else {
project = projectName;
parameters = null;
return false;
}
Logger.getLogger(CopyArtifact.class.getName()).log(Level.INFO, "Split {0} into {1} with parameters {2}", new Object[] {projectName, project, parameters});
projectName = null;
job.save();
return true;
}

private boolean isUpgradeNeeded() {

0 comments on commit bc9cc18

Please sign in to comment.
You can’t perform that action at this time.