if ("js".equals(type)) {
JavaScriptCompressor jsc = new JavaScriptCompressor(in, getLogBasedErrorReporter());
jsc.compress(out, linebreak, munge, verbose, preserveAllSemiColons, disableOptimizations);
} else if ("css".equals(type)) {
CssCompressor cssc = new CssCompressor(in);
cssc.compress(out, 100);
}
out.flush();
minifiedBytes = baos.toByteArray();
} catch (Exception e) { // Catch everything - on a runtime exception, we still want to return the unminified bytes
LOG.warn("Could not minify resources, returned unminified bytes", e);