[Java. Logging] Add check if any of validators for formatter logger placeholders are null

IDEA-342483

GitOrigin-RevId: f16fc3f3782e64ef3d8c3a61bf995261cde8452e
This commit is contained in:
Georgii Ustinov
2024-04-10 14:15:14 +00:00
committed by intellij-monorepo-bot
parent 1a2988e233
commit cb061ed4cf
@@ -346,6 +346,10 @@ private fun countFormattedBasedPlaceholders(holders: List<LoggingStringPartEvalu
return PlaceholderCountResult(emptyList(), PlaceholdersStatus.ERROR_TO_PARSE_STRING)
}
if (validators.any { it == null }) {
return PlaceholderCountResult(emptyList(), PlaceholdersStatus.ERROR_TO_PARSE_STRING)
}
val placeholderRangeList = validators.map { metaValidator ->
PlaceholderRanges(
if (metaValidator is FormatDecode.MultiValidator) metaValidator.validators.map { validator -> validator.range }