Skip to content

Commit aeb1491

Browse files
committed
fix: NPE
1 parent 46d196a commit aeb1491

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
import com.browserstack.automate.exception.SessionNotFound;
77
import com.browserstack.client.BrowserStackClient;
88
import com.browserstack.client.model.BrowserStackObject;
9-
import com.browserstack.client.util.Tools;
109
import com.fasterxml.jackson.annotation.*;
1110

12-
import java.text.ParseException;
13-
import java.util.Date;
1411
import java.util.HashMap;
1512
import java.util.Map;
1613

@@ -255,6 +252,7 @@ private void setStatus(String status) {
255252

256253
/**
257254
* BrowserStack status, i.e. non user marked status
255+
*
258256
* @return The browserStackStatus
259257
*/
260258
@JsonProperty("browserstack_status")
@@ -272,6 +270,7 @@ public void setBrowserStackStatus(String status) {
272270

273271
/**
274272
* Session creation date
273+
*
275274
* @return The createdAt
276275
*/
277276
@JsonProperty("created_at")
@@ -281,6 +280,7 @@ public String getCreatedAt() {
281280

282281
/**
283282
* Set session creation date
283+
*
284284
* @param createdAt Date type
285285
*/
286286
@JsonProperty("created_at")

src/main/java/com/browserstack/client/BrowserStackClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public List<Build> getBuilds(final BuildStatus status, final int limit, final St
279279
httpRequest.queryString(Constants.Filter.FILTER, status.name().toLowerCase());
280280
}
281281

282-
if (buildName != null || !buildName.isEmpty()) {
282+
if (buildName != null && !buildName.isEmpty()) {
283283
httpRequest.queryString(Constants.Filter.BUILD_NAME, buildName);
284284
}
285285

0 commit comments

Comments
 (0)