NebulaLogger icon indicating copy to clipboard operation
NebulaLogger copied to clipboard

Logger.info(String message, List<SObject> records) throws index out of bounds error

Open EoghanMcMullen opened this issue 3 years ago • 1 comments

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

v4.6.1

New Bug Summary

Logger.info(String message, List<SObject> records) end up calling LogEntryEventBuilder.stripInaccessible. There is a chance that Logger.info is called with an empty list. LogEntryEventBuilder.stripInaccessible performs a null check on the list but does not check if the list is empty. records.get(0) is called which can throw an index out of bounds error.

EoghanMcMullen avatar Jul 11 '22 21:07 EoghanMcMullen

@EoghanMcMullen thanks for reporting this! This should hopefully be a quick fix, I'll get this resolved ASAP.

jongpie avatar Jul 29 '22 12:07 jongpie