wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/js/RhinoTypeScriptProcessor.java
@Override
  public void process(final Resource resource, final Reader reader, final Writer writer)
      throws IOException {
    LOG.debug("processing resource: {}", resource);
    final String content = IOUtils.toString(reader);
    final TypeScriptCompiler compiler = enginePool.getObject();
    try {
      writer.write(compiler.compile(content));
    } catch (final Exception e) {
      onException(e, content);
    } finally {
      // return for later reuse
      enginePool.returnObject(compiler);
      reader.close();
      writer.close();
    }
  }
@Override
  public void process(final Resource resource, final Reader reader, final Writer writer)
      throws IOException {
    LOG.debug("processing resource: {}", resource);
    final String content = IOUtils.toString(reader);
    final TypeScriptCompiler compiler = enginePool.getObject();
    try {
      writer.write(compiler.compile(content));
    } catch (final Exception e) {
      onException(e, content);
    } finally {
      // return for later reuse
      enginePool.returnObject(compiler);
      reader.close();
      writer.close();
    }
  }
{@inheritDoc}