ProblemDescriptor[] (@NotNull PsiClass aClass, @NotNull InspectionManager manager, boolean isOnTheFly) { List<ProblemDescriptor> allProblems = null; final PsiClassInitializer[] initializers = aClass.getInitializers(); for (PsiClassInitializer initializer : initializers) { final List<ProblemDescriptor> problems = checkCodeBlock(initializer.getBody(), manager, isOnTheFly); if (problems != null) { if (allProblems == null) { allProblems = new ArrayList<>(1); } allProblems.addAll(problems); } } return allProblems == null ? null : allProblems.toArray(ProblemDescriptor.EMPTY_ARRAY); }