|
From: <jue...@we...> - 2004-06-29 11:42:53
|
Thanks for spotting this - fixed!
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Janek Bogucki
Sent: Monday, June 28, 2004 12:16 AM
To: spr...@li...
Subject: [Springframework-developer] AbstractXsltView: redundant check
in cacheTemplates
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 !=3D null && =
!"".equals(this.stylesheetLocation)) {
try {
this.templates =3D =
this.transformerFactory.newTemplates(getStylesheetSource(this.stylesheetL=
ocation));
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=20
if (this.stylesheetLocation !=3D null) {
which is equivalent because an instance of Resource will never equal the =
empty String.
-Janek Bogucki
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20
digital self defense, top technical experts, no vendor pitches,=20
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|