Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit cc700ec

Browse files
committed
fixed NPE in AbstractClientIT
1 parent 0951928 commit cc700ec

File tree

1 file changed

+4
-4
lines changed
  • extensions/spring/stormpath-spring-security-webmvc/src/test/groovy/com/stormpath/spring/config

1 file changed

+4
-4
lines changed

extensions/spring/stormpath-spring-security-webmvc/src/test/groovy/com/stormpath/spring/config/AbstractClientIT.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ abstract class AbstractClientIT extends AbstractTestNGSpringContextTests {
8888

8989
while (emailId == null && count++ < 150) {
9090
for (JsonNode emailNode : emailList) {
91-
String mailSubject = emailNode.get("mail_subject").asText()
92-
String localEmailId = emailNode.get("mail_id").asText()
93-
if (mailSubject.toLowerCase().contains("reset your password")) {
91+
String mailSubject = (emailNode.get("mail_subject") != null) ? emailNode.get("mail_subject").asText() : null
92+
String localEmailId = (emailNode.get("mail_id") != null) ? emailNode.get("mail_id").asText() : null
93+
if (mailSubject != null && mailSubject.toLowerCase().contains("reset your password")) {
9494
emailId = localEmailId
9595
break
9696
}
9797
}
9898
if (emailId == null) { // try retrieving email again
99-
Thread.sleep(100)
99+
Thread.sleep(200)
100100
json = get(GUERILLA_MAIL_BASE + "?f=get_email_list&offset=0&sid_token=" + guerillaEmail.getToken()).asString()
101101
rootNode = mapper.readTree(json)
102102
emailList = rootNode.path("list")

0 commit comments

Comments
 (0)