Skip to content

Commit a85b60e

Browse files
committed
Using Jackson 2.2.0 for Java5 compat
1 parent 98bf4ae commit a85b60e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<properties>
1414
<unirest.version>1.4.9</unirest.version>
1515
<httpclient.version>4.5.2</httpclient.version>
16-
<jackson.version>2.7.2</jackson.version>
16+
<jackson.version>2.2.0</jackson.version>
1717
<junit.version>4.12</junit.version>
1818
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1919
<maven.compiler.source>1.5</maven.compiler.source>

src/main/java/com/browserstack/automate/AutomateClient.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ public final boolean deleteProject(final int projectId) throws AutomateException
154154
.routeParam("projectId", "" + projectId)
155155
.asJsonObject();
156156

157-
return (result != null && result.path("status").asText("").equals("ok"));
157+
String status = (result != null) ? result.path("status").asText() : null;
158+
return (status != null) && status.equals("ok");
158159
} catch (BrowserStackException e) {
159160
throw new AutomateException(e);
160161
}
@@ -280,7 +281,8 @@ public final boolean deleteBuild(final String buildId) throws AutomateException
280281
.routeParam("buildId", buildId)
281282
.asJsonObject();
282283

283-
return (result != null && result.path("status").asText("").equals("ok"));
284+
String status = (result != null) ? result.path("status").asText() : null;
285+
return (status != null && status.equals("ok"));
284286
} catch (BrowserStackException e) {
285287
throw new AutomateException(e);
286288
}
@@ -522,7 +524,8 @@ public final boolean deleteSession(final String sessionId) throws SessionNotFoun
522524
.routeParam("sessionId", sessionId)
523525
.asJsonObject();
524526

525-
return (result != null && result.path("status").asText("").equals("ok"));
527+
String status = (result != null) ? result.path("status").asText() : null;
528+
return (status != null && status.equals("ok"));
526529
} catch (BrowserStackException e) {
527530
throw new AutomateException(e);
528531
}

src/main/java/com/browserstack/automate/model/BuildNode.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
@JsonInclude(JsonInclude.Include.NON_NULL)
1010
public class BuildNode implements Serializable {
1111

12-
@JsonProperty("automation_build")
1312
private Build build;
1413

1514
@JsonIgnore

0 commit comments

Comments
 (0)