|
From: Janek B. <ya...@st...> - 2004-06-27 22:16:03
|
In AbstractXsltView#cacheTemplates there's a redundant equality test between an instance
of Resource and the empty String:
/** URL of stylesheet */
private Resource stylesheetLocation;
private void cacheTemplates() throws ApplicationContextException {
if (this.stylesheetLocation != null && !"".equals(this.stylesheetLocation)) {
try {
this.templates = this.transformerFactory.newTemplates(getStylesheetSource(this.stylesheetLocation));
logger.debug("Loaded templates [" + this.templates + "] in XSLT view '" + getBeanName() + "'");
}
catch (TransformerConfigurationException ex) {
throw new ApplicationContextException(
"Can't load stylesheet from " + this.stylesheetLocation + " in XSLT view '" + getBeanName() + "'", ex);
}
}
}
This could be reduced to
if (this.stylesheetLocation != null) {
which is equivalent because an instance of Resource will never equal the empty String.
-Janek Bogucki
|