Skip to content

Commit 173558c

Browse files
author
Michael Voigt
committed
Revert "Merge pull request #1 from jenkinsci/master"
This reverts commit 977429e, reversing changes made to 45e4bc3.
1 parent 977429e commit 173558c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ after_script:
3636
# http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html
3737
# - oraclejdk8 is not supported anymore.
3838
jdk:
39-
- openjdk8
39+
- openjdk7
4040
cache:
4141
directories:
4242
- $HOME/.m2/repository

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ public String Stop() throws HttpResponseException, IOException {
140140
try {
141141

142142
return client.get(url + "stop");
143-
} catch (HttpResponseException ex) {
144-
if (ex.getStatusCode() == 405) {
143+
} catch (IOException ex) {
144+
if (((HttpResponseException) ex).getStatusCode() == 405) {
145145
stopPost();
146146
return "";
147147
}
148-
throw ex;
149148
}
149+
return "";
150150
}
151151

152152
/** Stops the build which is currently in progress. This version takes in
@@ -163,13 +163,13 @@ public String Stop(boolean crumbFlag) throws HttpResponseException, IOException
163163
try {
164164

165165
return client.get(url + "stop");
166-
} catch (HttpResponseException ex) {
167-
if (ex.getStatusCode() == 405) {
166+
} catch (IOException ex) {
167+
if (((HttpResponseException) ex).getStatusCode() == 405) {
168168
stopPost(crumbFlag);
169169
return "";
170170
}
171-
throw ex;
172171
}
172+
return "";
173173
}
174174

175175
private void stopPost(boolean crumbFlag) throws HttpResponseException, IOException {

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
<properties>
4444
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4545
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
46-
<maven.compiler.source>1.8</maven.compiler.source>
47-
<maven.compiler.target>1.8</maven.compiler.target>
46+
<maven.compiler.source>1.7</maven.compiler.source>
47+
<maven.compiler.target>1.7</maven.compiler.target>
4848
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
4949
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>
5050

0 commit comments

Comments
 (0)