Skip to content

Commit

Permalink
Merge pull request #419 from res0nance/pct
Browse files Browse the repository at this point in the history
Fix PCT failures past 2.281
  • Loading branch information
bitwiseman committed Jun 3, 2021
2 parents 15978cd + 058a12e commit 86240ce
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
import hudson.triggers.SCMTrigger;
import hudson.triggers.TimerTrigger;
import hudson.triggers.Trigger;
import hudson.util.VersionNumber;
import jenkins.model.BuildDiscarderProperty;
import jenkins.model.Jenkins;
import jenkins.model.OptionalJobProperty;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
Expand Down Expand Up @@ -148,14 +150,14 @@ public void simpleInput() throws Exception {
"}");
}

// TODO: Remove once we move to a baseline of 2.90 or later
// TODO: Remove once we move to a baseline of 2.281 or later
private String trimParamOrEmpty() {
try {
StringParameterDefinition.class.getMethod("isTrim");
return ", trim: false";
} catch (NoSuchMethodException e) {
if (Jenkins.getVersion().isNewerThanOrEqualTo(new VersionNumber("2.281"))) {
return "";
}
else {
return ", trim: false";
}
}

@Test
Expand Down

0 comments on commit 86240ce

Please sign in to comment.