From d2e256f470f0073d3fa3b4495a33da0aaa048a65 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 20 May 2015 19:29:52 +0300 Subject: [PATCH] Output annotation processor fqName if the processor can't be initialized --- .../jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt b/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt index a1b70d5d0fd..a0ed37783e7 100644 --- a/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt +++ b/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt @@ -41,7 +41,7 @@ public abstract class AnnotationProcessorWrapper(private val processorFqName: St private val processor: Processor by Delegates.lazy { try { val instance = Class.forName(processorFqName).newInstance() as? Processor - instance ?: throw IllegalArgumentException("Instance has a wrong type") + instance ?: throw IllegalArgumentException("Instance has a wrong type: $processorFqName") } catch (e: Exception) { AnnotationProcessorStub() @@ -88,7 +88,7 @@ public abstract class AnnotationProcessorWrapper(private val processorFqName: St } override fun process(annotations: MutableSet?, roundEnv: RoundEnvironment): Boolean { - roundCounter = roundCounter + 1 + roundCounter += 1 val annotatedKotlinElements = kotlinAnnotationsProvider.annotatedKotlinElements val roundEnvironmentWrapper = RoundEnvironmentWrapper(processingEnv, roundEnv, roundCounter, annotatedKotlinElements)