Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-08-16 09:14:42 -07:00
parent c80ea7b7d3
commit 7b27ddbc86
4 changed files with 3 additions and 6 deletions

View file

@ -52,7 +52,7 @@ public class CodeTag extends SimpleTagSupport {
@Override @Override
public void doTag() throws IOException { public void doTag() throws IOException {
final PageContext pageContext = (PageContext) getJspContext(); final PageContext pageContext = (PageContext) getJspContext();
@SuppressWarnings("PMD.CloseResource") final JspWriter out = pageContext.getOut(); final JspWriter out = pageContext.getOut();
out.write(String.valueOf(pageContext.getErrorData().getStatusCode())); out.write(String.valueOf(pageContext.getErrorData().getStatusCode()));
} }

View file

@ -52,7 +52,7 @@ public class MessageTag extends XmlSupport {
@Override @Override
public void doTag() throws IOException { public void doTag() throws IOException {
final PageContext pageContext = (PageContext) getJspContext(); final PageContext pageContext = (PageContext) getJspContext();
@SuppressWarnings("PMD.CloseResource") final JspWriter out = pageContext.getOut(); final JspWriter out = pageContext.getOut();
final String message = (String) pageContext.getRequest().getAttribute( final String message = (String) pageContext.getRequest().getAttribute(
jakarta.servlet.RequestDispatcher.ERROR_MESSAGE); jakarta.servlet.RequestDispatcher.ERROR_MESSAGE);

View file

@ -56,7 +56,7 @@ public class ReasonTag extends XmlSupport {
@Override @Override
public void doTag() { public void doTag() {
final PageContext pageContext = (PageContext) getJspContext(); final PageContext pageContext = (PageContext) getJspContext();
@SuppressWarnings("PMD.CloseResource") final JspWriter out = pageContext.getOut(); final JspWriter out = pageContext.getOut();
try { try {
if (statusCode > -1) { if (statusCode > -1) {
@ -75,7 +75,6 @@ public class ReasonTag extends XmlSupport {
* *
* @param statusCode The status code. * @param statusCode The status code.
*/ */
@SuppressWarnings("unused")
public void setCode(final int statusCode) { public void setCode(final int statusCode) {
this.statusCode = statusCode; this.statusCode = statusCode;
} }

View file

@ -57,7 +57,6 @@ public abstract class XmlSupport extends SimpleTagSupport {
* *
* @param defaultValue The default value. * @param defaultValue The default value.
*/ */
@SuppressWarnings("unused")
public void setDefault(final String defaultValue) { public void setDefault(final String defaultValue) {
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
} }
@ -67,7 +66,6 @@ public abstract class XmlSupport extends SimpleTagSupport {
* *
* @param escapeXml <code>true</code> or <code>false</code> * @param escapeXml <code>true</code> or <code>false</code>
*/ */
@SuppressWarnings("unused")
public void setEscapeXml(final boolean escapeXml) { public void setEscapeXml(final boolean escapeXml) {
this.escapeXml = escapeXml; this.escapeXml = escapeXml;
} }