mirror of https://github.com/apache/lucene.git
Fix bug with getResourceStream method - was returning template name, not template contents. Added v. prefix to template override parameters
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@718549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
be934a496e
commit
8d2d6b24e0
|
@ -42,8 +42,8 @@ public class SolrParamResourceLoader extends ResourceLoader {
|
|||
while (names.hasNext()) {
|
||||
String name = names.next();
|
||||
|
||||
if (name.startsWith("template.")) {
|
||||
templates.put(name.substring(9) + ".vm",params.get(name));
|
||||
if (name.startsWith("v.template.")) {
|
||||
templates.put(name.substring(11) + ".vm",params.get(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class SolrParamResourceLoader extends ResourceLoader {
|
|||
|
||||
public InputStream getResourceStream(String s) throws ResourceNotFoundException {
|
||||
String template = templates.get(s);
|
||||
return template == null ? null : new ByteArrayInputStream( s.getBytes() );
|
||||
return template == null ? null : new ByteArrayInputStream(template.getBytes());
|
||||
}
|
||||
|
||||
public boolean isSourceModified(Resource resource) {
|
||||
|
|
Loading…
Reference in New Issue