wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/impl/PlaceholderProcessor.java
public void process(final Resource resource, final Reader reader, final Writer writer)
    throws IOException {
    final String content = IOUtils.toString(reader);
    final Matcher matcher = PATTERN_PLACEHOLDER.matcher(content);
    final StringBuffer sb = new StringBuffer();

    Properties properties = null;
    if (propertiesFactory != null) {
      properties = propertiesFactory.create();
    }
    //be sure that properties will never be null;
    if (properties == null) {
      properties = EMPTY_PROPERTIES;
    }
    while (matcher.find()) {
      final String variableName = matcher.group(1);
      LOG.debug("found placeholder: {}", variableName);
      matcher.appendReplacement(sb, replaceVariable(properties, variableName));
    }
    matcher.appendTail(sb);
    writer.write(sb.toString());
  }
public void process(final Resource resource, final Reader reader, final Writer writer)
    throws IOException {
    final String content = IOUtils.toString(reader);
    final Matcher matcher = PATTERN_PLACEHOLDER.matcher(content);
    final StringBuffer sb = new StringBuffer();

    Properties properties = null;
    if (propertiesFactory != null) {
      properties = propertiesFactory.create();
    }
    //be sure that properties will never be null;
    if (properties == null) {
      properties = EMPTY_PROPERTIES;
    }
    while (matcher.find()) {
      final String variableName = matcher.group(1);
      LOG.debug("found placeholder: {}", variableName);
      matcher.appendReplacement(sb, replaceVariable(properties, variableName));
    }
    matcher.appendTail(sb);
    writer.write(sb.toString());
  }
{@inheritDoc}