Skip to content

Commit

Permalink
[#13109] IndexOutOfBoundsException encountered by LogsProcessor (#13120)
Browse files Browse the repository at this point in the history
* #13109-added check to see if logs is empty

* switch back to logs.get(list.size()-1)

* [#13109] IndexOutOfBoundsException encountered by LogsProcessor

---------

Co-authored-by: domoberzin <[email protected]>
  • Loading branch information
Ashwinn11 and domoberzin authored Jun 12, 2024
1 parent 5ed1cf7 commit ec1f276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/teammates/logic/api/LogsProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public int getNumberOfLogsForEvent(Instant startTime, Instant endTime, LogEvent
QueryLogsResults logFetchResults = queryLogs(logsParams);
List<GeneralLogEntry> logs = logFetchResults.getLogEntries();
total += logs.size();
if (logFetchResults.getHasNextPage()) {
if (logFetchResults.getHasNextPage() && !logs.isEmpty()) {
logStartTime = logs.get(logs.size() - 1).getTimestamp();
} else {
break;
Expand Down

0 comments on commit ec1f276

Please sign in to comment.