Skip to content

Commit

Permalink
fix crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
leducanh-olli committed Nov 16, 2022
1 parent 89591fd commit b4faf1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public String getResponseSummaryText() {
case Requested:
return null;
default:
return String.valueOf(responseCode) + " " + responseMessage;
return responseCode + " " + responseMessage;
}
}

Expand All @@ -341,12 +341,12 @@ public String getNotificationText() {
case Requested:
return " . . . " + path;
default:
return String.valueOf(responseCode) + " " + path;
return responseCode + " " + path;
}
}

public boolean isSsl() {
return scheme.toLowerCase().equals("https");
return scheme.equalsIgnoreCase("https");
}

private List<HttpHeader> toHttpHeaderList(Headers headers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@ public synchronized void show(HttpTransaction transaction) {
int count = 0;
for (int i = transactionBuffer.size() - 1; i >= 0; i--) {
if (count < BUFFER_SIZE) {
if (count == 0) {
builder.setContentText(transactionBuffer.valueAt(i).getNotificationText());
HttpTransaction httpTransaction = transactionBuffer.valueAt(i);
if(httpTransaction != null){
if (count == 0) {
builder.setContentText(httpTransaction.getNotificationText());
}
inboxStyle.addLine(httpTransaction.getNotificationText());
}
inboxStyle.addLine(transactionBuffer.valueAt(i).getNotificationText());
}
count++;
}
Expand Down

0 comments on commit b4faf1b

Please sign in to comment.