Skip to content

Commit

Permalink
Merge pull request jenkinsci#240 from bremerjonathan/refactoring
Browse files Browse the repository at this point in the history
Removed code repeat in method
  • Loading branch information
khmarbaise authored Apr 8, 2017
2 parents b518520 + 5fb8bfa commit fe735b3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ public QueueReference build(boolean crumbFlag) throws IOException {
* @throws IOException in case of an error.
*/
public QueueReference build(Map<String, String> params) throws IOException {
String qs = join(Collections2.transform(params.entrySet(), new MapEntryToQueryStringPair()), "&");
ExtractHeader location = client.post(url + "buildWithParameters?" + qs, null, ExtractHeader.class, false);
return new QueueReference(location.getLocation());
return build(params, false);
}

/**
Expand Down

0 comments on commit fe735b3

Please sign in to comment.