Drop BindingContext.ANNOTATION_DESCRIPTOR_TO_PSI_ELEMENT

Use AnnotationDescriptor.getSource() instead
This commit is contained in:
Alexander Udalov
2015-07-24 02:20:36 +03:00
parent d0562b7b90
commit 49a8c7a947
6 changed files with 23 additions and 26 deletions
@@ -181,7 +181,7 @@ public class PublicFieldAnnotationChecker: DeclarationChecker {
val annotation = descriptor.findPublicFieldAnnotation() ?: return
fun report() {
val annotationEntry = bindingContext.get(BindingContext.ANNOTATION_DESCRIPTOR_TO_PSI_ELEMENT, annotation) ?: return
val annotationEntry = DescriptorToSourceUtils.getSourceFromAnnotation(annotation) ?: return
diagnosticHolder.report(ErrorsJvm.INAPPLICABLE_PUBLIC_FIELD.on(annotationEntry))
}