in geronimo-microprofile-reporter/src/main/java/org/apache/geronimo/microprofile/reporter/storage/front/HtmlWriter.java [66:77]
public void writeTo(final Html html, final Class<?> type, final Type genericType,
final Annotation[] annotations, final MediaType mediaType,
final MultivaluedMap<String, Object> httpHeaders, final OutputStream entityStream)
throws IOException, WebApplicationException {
final String template = templates.computeIfAbsent(html.getName(), this::loadTemplate);
final Function<Object, String> compiled = templatingEngine.compileIfNeeded(template, this::loadTemplate);
entityStream.write(compiled.apply(html.getData()).getBytes(StandardCharsets.UTF_8));
if (development) {
templates.clear();
templatingEngine.clean();
}
}