/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/impl/CommentStripperProcessor.java
final String content = IOUtils.toString ( reader ) ;
import ro.isdc.wro.util.WroUtil; public class CommentStripperProcessor implements ResourcePreProcessor, ResourcePostProcessor { public void process(final Resource resource, final Reader reader, final Writer writer) throws IOException { try (reader; writer) { <extra_id_0> String result = SingleLineCommentStripperProcessor.PATTERN.matcher(content).replaceAll(StringUtils.EMPTY); result = MultiLineCommentStripperProcessor.PATTERN.matcher(result).replaceAll(StringUtils.EMPTY); result = WroUtil.EMTPY_LINE_PATTERN.matcher(result).replaceAll(StringUtils.EMPTY); writer.write(result); } }