Skip to content

Commit fe735b3

Browse files
authored
Merge pull request #240 from bremerjonathan/refactoring
Removed code repeat in method
2 parents b518520 + 5fb8bfa commit fe735b3

File tree

1 file changed

+1
-3
lines changed
  • jenkins-client/src/main/java/com/offbytwo/jenkins/model

1 file changed

+1
-3
lines changed

jenkins-client/src/main/java/com/offbytwo/jenkins/model/Job.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ public QueueReference build(boolean crumbFlag) throws IOException {
9696
* @throws IOException in case of an error.
9797
*/
9898
public QueueReference build(Map<String, String> params) throws IOException {
99-
String qs = join(Collections2.transform(params.entrySet(), new MapEntryToQueryStringPair()), "&");
100-
ExtractHeader location = client.post(url + "buildWithParameters?" + qs, null, ExtractHeader.class, false);
101-
return new QueueReference(location.getLocation());
99+
return build(params, false);
102100
}
103101

104102
/**

0 commit comments

Comments
 (0)