@NotNull
 private InspectionGadgetsFix[] createFixes(Object... infos) {
   if (!onTheFly && inspection.buildQuickFixesOnlyForOnTheFlyErrors()) {
     return InspectionGadgetsFix.EMPTY_ARRAY;
   }
   final InspectionGadgetsFix[] fixes = inspection.buildFixes(infos);
   if (fixes.length > 0) {
     return fixes;
   }
   final InspectionGadgetsFix fix = inspection.buildFix(infos);
   if (fix == null) {
     return InspectionGadgetsFix.EMPTY_ARRAY;
   }
   return new InspectionGadgetsFix[] {fix};
 }
 protected final void registerError(@NotNull PsiElement location, Object... infos) {
   if (location.getTextLength() == 0) {
     return;
   }
   final InspectionGadgetsFix[] fixes = createFixes(infos);
   for (InspectionGadgetsFix fix : fixes) {
     fix.setOnTheFly(onTheFly);
   }
   final String description = inspection.buildErrorString(infos);
   holder.registerProblem(location, description, fixes);
 }