From 1bc105aff60318f221f8aad812d7b42f0eecf987 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 30 Aug 2022 15:45:25 +0200 Subject: [PATCH] Kotlin: adjust log messages and severities in comment extraction --- .../src/main/kotlin/comments/CommentExtractor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/kotlin-extractor/src/main/kotlin/comments/CommentExtractor.kt b/java/kotlin-extractor/src/main/kotlin/comments/CommentExtractor.kt index 3f1eb8f24b3..0cc5b66cf5e 100644 --- a/java/kotlin-extractor/src/main/kotlin/comments/CommentExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/comments/CommentExtractor.kt @@ -140,7 +140,7 @@ class CommentExtractor(private val fileExtractor: KotlinFileExtractor, private v is IrAnonymousInitializer -> { val parentClass = element.parentClassOrNull if (parentClass == null) { - logger.errorElement("Parent of anonymous initializer is not a class", element) + logger.warnElement("Parent of anonymous initializer is not a class", element) return null } // Assign the comment to the class. The content of the `init` blocks might be extracted in multiple constructors. @@ -153,7 +153,7 @@ class CommentExtractor(private val fileExtractor: KotlinFileExtractor, private v // todo add others: else -> { - logger.errorElement("Unhandled element type: ${element::class}", element) + logger.warnElement("Unhandled element type found during comment extraction: ${element::class}", element) return null } }