i++;
}
-
+
InputStream in = IOUtils.openResource(location, name);
-
- InputStream stream;
-
- stream = IOUtils.openResource(location, name);
- System.out.println("SOURCE = ((" + IOUtils.readSmallStream(stream) + "))");
- stream=new ReplaceInputStream(IOUtils.openResource(location, name), from, to);
- System.out.println("RESULT = ((" + IOUtils.readSmallStream(stream) + "))");
-
-
return new ReplaceInputStream(in, from, to);
}
public synchronized Template set(String key, String value) {
- values.put(key, value);
+ values.put(key, value == null ? "" : value);
valuesTemplate.remove(key);
valuesTemplateList.remove(key);
return this;
}
public synchronized Template set(String key, Template value) {
+ if (value == null) {
+ return set(key, "");
+ }
+
values.remove(key);
valuesTemplate.put(key, value);
valuesTemplateList.remove(key);
+
return this;
}