This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jelly.git
commit dd574bc315aa7f975b9547c06e02db6db92883c1 Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jun 13 11:36:34 2025 -0400 Use final --- .../commons/jelly/tags/jsl/ApplyTemplatesTag.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jelly-tags/jsl/src/main/java/org/apache/commons/jelly/tags/jsl/ApplyTemplatesTag.java b/jelly-tags/jsl/src/main/java/org/apache/commons/jelly/tags/jsl/ApplyTemplatesTag.java index 7aafa7a2..383877e1 100644 --- a/jelly-tags/jsl/src/main/java/org/apache/commons/jelly/tags/jsl/ApplyTemplatesTag.java +++ b/jelly-tags/jsl/src/main/java/org/apache/commons/jelly/tags/jsl/ApplyTemplatesTag.java @@ -31,7 +31,7 @@ import org.jaxen.XPath; public class ApplyTemplatesTag extends TagSupport { /** The Log to which logging calls will be made. */ - private Log log = LogFactory.getLog(ApplyTemplatesTag.class); + private final Log log = LogFactory.getLog(ApplyTemplatesTag.class); /** Holds value of property mode. */ private String mode; @@ -46,19 +46,19 @@ public class ApplyTemplatesTag extends TagSupport { //------------------------------------------------------------------------- /** By default just evaluate the body */ @Override - public void doTag(XMLOutput output) throws JellyTagException { - StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class ); + public void doTag(final XMLOutput output) throws JellyTagException { + final StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class ); if (tag == null) { throw new JellyTagException( "<applyTemplates> tag must be inside a <stylesheet> tag" ); } - Stylesheet stylesheet = tag.getStylesheet(); + final Stylesheet stylesheet = tag.getStylesheet(); - XMLOutput oldOutput = tag.getStylesheetOutput(); + final XMLOutput oldOutput = tag.getStylesheetOutput(); tag.setStylesheetOutput(output); - Object source = tag.getXPathSource(); + final Object source = tag.getXPathSource(); // for some reason, these DOM4J methods only throw Exception try { if ( select != null ) { @@ -68,7 +68,7 @@ public class ApplyTemplatesTag extends TagSupport { stylesheet.applyTemplates( source, mode ); } } - catch (Exception e) { + catch (final Exception e) { throw new JellyTagException(e); } @@ -81,14 +81,14 @@ public class ApplyTemplatesTag extends TagSupport { // Properties //------------------------------------------------------------------------- - public void setSelect( XPath select ) { + public void setSelect( final XPath select ) { this.select = select; } /** Sets the mode. * @param mode New value of property mode. */ - public void setMode(String mode) { + public void setMode(final String mode) { this.mode = mode; } }