From 6699b03c0b0a10866c491a22f560af0b3532e1ec Mon Sep 17 00:00:00 2001 From: Vyacheslav Gerasimov Date: Mon, 16 Jan 2017 15:06:18 +0300 Subject: [PATCH] Fixed error reporting in AnnotationDetector #KT-14920 Fixed (cherry picked from commit 3647d53) --- .../src/com/android/tools/klint/checks/AnnotationDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lint/lint-checks/src/com/android/tools/klint/checks/AnnotationDetector.java b/plugins/lint/lint-checks/src/com/android/tools/klint/checks/AnnotationDetector.java index 8e14c9489f4..4ea44f60a1e 100644 --- a/plugins/lint/lint-checks/src/com/android/tools/klint/checks/AnnotationDetector.java +++ b/plugins/lint/lint-checks/src/com/android/tools/klint/checks/AnnotationDetector.java @@ -248,7 +248,7 @@ public class AnnotationDetector extends Detector implements Detector.UastScanner invalid = from > to; } if (invalid) { - mContext.report(ANNOTATION_USAGE, annotation.getPsi(), mContext.getLocation(annotation.getPsi()), + mContext.reportUast(ANNOTATION_USAGE, annotation, mContext.getUastLocation(annotation), "Invalid range: the `from` attribute must be less than " + "the `to` attribute"); }