BinaryContent (CompileContext context, CompiledClass compiledClass, ClassReader reader, ClassWriter writer, InstrumentationClassFinder finder) { try { boolean generateLineNumbers = SystemProperties.getBooleanProperty(GENERATE_LINE_NUMBERS_PROPERTY, false); if (TMHInstrumenter.instrument(reader, writer, generateLineNumbers)) { return new BinaryContent(writer.toByteArray()); } } catch (Throwable e) { LOG.error(e); final Collection<File> sourceFiles = compiledClass.getSourceFiles(); String msg = DevKitJpsBundle.message("tmh.cannot.instrument", StringUtil.join(sourceFiles, File::getName, ", "), e.getMessage()); String firstFile = ContainerUtil.getFirstItem(compiledClass.getSourceFilesPaths()); context.processMessage(new CompilerMessage(getPresentableName(), BuildMessage.Kind.ERROR, msg, firstFile)); } return null; }