Package ro.isdc.wro.util

Examples of ro.isdc.wro.util.StopWatch$TaskInfo


  }

  @Override
  public void process(final Reader reader, final Writer writer)
      throws IOException {
    final StopWatch stopWatch = new StopWatch();
    stopWatch.start("lessify");
    Context context = Context.get();
    HttpServletRequest request = context.getRequest();
    String uri = request.getRequestURI();
    try {
      logger.debug("lessifying: {}", uri);
      LessCompiler less = new LessCompiler();
      String content = IOUtils.toString(reader);
      writer.write(less.compile(content));
    } catch (LessException ex) {
      throw new LessRuntimeException(LessCssError.of(
          uri, ex.getCause()), ex.getCause());
    } finally {
      // Rhino throws an exception when trying to exit twice. Make sure we don't
      // get any exception
      if (org.mozilla.javascript.Context.getCurrentContext() != null) {
        org.mozilla.javascript.Context.exit();
      }
      IOUtils.closeQuietly(reader);
      IOUtils.closeQuietly(writer);
      stopWatch.stop();
      logger.debug(stopWatch.prettyPrint());
    }
  }
View Full Code Here

TOP

Related Classes of ro.isdc.wro.util.StopWatch$TaskInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.