LocalInspectionTool[] (InspectionToolProvider... provider) { List<LocalInspectionTool> result = new ArrayList<>(); for (InspectionToolProvider toolProvider : provider) { for (Class<? extends LocalInspectionTool> aClass : toolProvider.getInspectionClasses()) { try { LocalInspectionTool tool = InspectionTestUtil.instantiateTool(aClass); result.add(tool); } catch (Exception e) { LOG.error(e); } } } return result.toArray(LocalInspectionTool.EMPTY_ARRAY); }