IDEA-159541 Minor refactoring in UnstableApiUsageInspection

This commit is contained in:
Yaroslav Pankratyev
2018-04-24 22:49:23 +07:00
parent f34252c6c3
commit 4451a0dd50
@@ -72,19 +72,14 @@ public class UnstableApiUsageInspection extends LocalInspectionTool {
continue;
}
boolean problemRegistered = false;
for (String annotation : unstableApiAnnotations) {
if (modifierListOwner.hasAnnotation(annotation)) {
holder.registerProblem(reference,
DevKitBundle.message("inspections.unstable.api.usage.description", getReferenceText(reference)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
problemRegistered = true;
break;
return;
}
}
if (problemRegistered) {
break;
}
}
}
};