From 5fb8bfa479e3dee2a25b7af91c4af9245f5878fc Mon Sep 17 00:00:00 2001 From: Bremer Jonathan Date: Fri, 7 Apr 2017 12:02:57 -0400 Subject: [PATCH] Removed code repeat in method --- .../src/main/java/com/offbytwo/jenkins/model/Job.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jenkins-client/src/main/java/com/offbytwo/jenkins/model/Job.java b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/Job.java index ffced35a..8f411b7f 100644 --- a/jenkins-client/src/main/java/com/offbytwo/jenkins/model/Job.java +++ b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/Job.java @@ -96,9 +96,7 @@ public QueueReference build(boolean crumbFlag) throws IOException { * @throws IOException in case of an error. */ public QueueReference build(Map 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); } /**