*/
@Override
public void process(final Resource resource, final Reader reader, final Writer writer)
throws IOException {
final String content = IOUtils.toString(reader);
final UglifyJs engine = enginePool.getObject();
try {
final String filename = resource == null ? "noName.js" : resource.getUri();
writer.write(engine.process(filename, content));
} catch (final WroRuntimeException e) {
onException(e);
final String resourceUri = resource == null ? StringUtils.EMPTY : "[" + resource.getUri() + "]";
LOG.warn("Exception while applying " + getClass().getSimpleName() + " processor on the " + resourceUri
+ " resource, no processing applied...", e);