boolean (@NotNull UField field) { PsiType fieldType = field.getType(); if (myMapType.isAssignableFrom(fieldType)) { PsiClass keyClass = getKeyClass(fieldType); if (keyClass != null && isLeakable(keyClass)) { PsiElement typeElement = getTypeElement(field); //noinspection UElementAsPsi PsiElement element = typeElement == null ? field.getNameIdentifier() : typeElement; myHolder.registerProblem( element, DevKitBundle.message("inspections.leakable.map.key.text", keyClass.getName()), ReplaceKeyQuickFix.createFixesFor(element) ); } } return true; }