Lint: Fix KT-11919 ("Missing Parcelable CREATOR field" rule is not accurate)

This commit is contained in:
Yan Zhulanow
2016-04-19 16:14:34 +03:00
parent 33434a3c5b
commit a2b1eb7ee8
6 changed files with 114 additions and 7 deletions
@@ -27,6 +27,9 @@ private val MODIFIER_MAP = mapOf(
)
internal fun PsiModifierListOwner.hasModifier(modifier: UastModifier): Boolean {
if (modifier == UastModifier.FIELD && this is PsiField) {
return true;
}
if (modifier == UastModifier.OVERRIDE && this is PsiAnnotationOwner) {
return this.annotations.any { it.qualifiedName == "java.lang.Override" }
}