From 426797a49e260a3f45b81c0e537d2659a063cb28 Mon Sep 17 00:00:00 2001 From: Karl Heinz Marbaise Date: Wed, 17 Aug 2016 22:31:17 +0200 Subject: [PATCH] Fixed #176 HttpResponseException: Not Found (createJob) o Using the crumbFlag = false instead of true. --- ReleaseNotes.md | 5 +++++ .../src/main/java/com/offbytwo/jenkins/JenkinsServer.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 2650810a..bd4db3b8 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -22,6 +22,10 @@ * maven-resources-plugin to 3.0.0 * maven-jar-plugin to 3.0.0 +[Fixed issue 176 HttpResponseException: Not Found (createJob)][issue-176] + Based on the wrong usage of the sub methods using crumbFlag=true instead + of crumbFlag=false. + [Fixed issue 162][issue-162] JenkinsJob.details() produced NPE which has been got via view.getJob(). @@ -574,6 +578,7 @@ TestReport testReport = mavenJob.getLastSuccessfulBuild().getTestReport(); [issue-169]: https://github.com/jenkinsci/java-client-api/issues/169 [issue-172]: https://github.com/jenkinsci/java-client-api/issues/172 [issue-174]: https://github.com/jenkinsci/java-client-api/issues/174 +[issue-176]: https://github.com/jenkinsci/java-client-api/issues/176 [pull-123]: https://github.com/jenkinsci/java-client-api/pull/123 [pull-149]: https://github.com/jenkinsci/java-client-api/pull/149 [pull-158]: https://github.com/jenkinsci/java-client-api/pull/158 diff --git a/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java b/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java index 934fc929..2178e63c 100644 --- a/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java +++ b/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java @@ -336,7 +336,7 @@ public Optional getFolderJob(Job job) throws IOException { * @throws IOException */ public void createJob(String jobName, String jobXml) throws IOException { - createJob(null, jobName, jobXml, true); + createJob(null, jobName, jobXml, false); } /** @@ -357,7 +357,7 @@ public void createJob(String jobName, String jobXml, Boolean crumbFlag) throws I * @throws IOException */ public void createJob(FolderJob folder, String jobName, String jobXml) throws IOException { - createJob(folder, jobName, jobXml, true); + createJob(folder, jobName, jobXml, false); } /**