template file name can't contain "."
xgc kxlzx <[email protected]> Thu, 14 Jul 2011 10:54:56 +0800
| Newsgroups | gmane.comp.jakarta.turbine.user |
|---|---|
| Message-ID | <CAHkBYcHNY+8dF1j84D==sBa3+QTBEEiqqbap0SgbqDk38FEWOQ@mail.gmail.com> |
Hi,all!
I wan't template file name like "user.money.vm".
but TurbineTemplateService getExtension function use "indexof()" get the
file extension.
It should be "lastindexof()"....
can you do it?
org.apache.turbine.services.template.TurbineTemplateService{
public String getExtension(String template)
{
if (StringUtils.isEmpty(template))
{
return getDefaultExtension();
}
//at here ,change to int dotIndex =
template.lastindexOf(EXTENSION_SEPARATOR);
int dotIndex = template.indexOf(EXTENSION_SEPARATOR);
return (dotIndex < 0) ? getDefaultExtension() :
template.substring(dotIndex + 1);
}
}
https://issues.apache.org/jira/browse/TRB-82