This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new d6db3a7fab Few more exception variable renames for consistency
d6db3a7fab is described below
commit d6db3a7fabe3f910e3bb35b7f2f0348a6c17d7ca
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Aug 20 17:21:22 2025 +0100
Few more exception variable renames for consistency
---
test/webapp/jsp/pageContext1.jsp | 2 +-
.../compressionFilters/CompressionServletResponseWrapper.java | 2 +-
webapps/examples/WEB-INF/classes/examples/FooTag.java | 4 ++--
webapps/examples/WEB-INF/classes/examples/LogTag.java | 4 ++--
webapps/examples/WEB-INF/classes/examples/ValuesTag.java | 4 ++--
webapps/examples/WEB-INF/classes/validators/DebugValidator.java | 2 +-
.../examples/WEB-INF/classes/websocket/chat/ChatAnnotation.java | 6 +++---
webapps/examples/WEB-INF/classes/websocket/drawboard/Client.java | 4 ++--
webapps/examples/WEB-INF/classes/websocket/drawboard/Room.java | 4 +++-
.../examples/WEB-INF/classes/websocket/echo/EchoAnnotation.java | 8 ++++----
10 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/test/webapp/jsp/pageContext1.jsp b/test/webapp/jsp/pageContext1.jsp
index 1f44f971fe..9e732489e3 100644
--- a/test/webapp/jsp/pageContext1.jsp
+++ b/test/webapp/jsp/pageContext1.jsp
@@ -24,7 +24,7 @@
} else {
pageContext.include("/jsp/pageContext2.jsp");
}
- } catch (IOException e) {
+ } catch (IOException ioe) {
out.println("OK");
return;
} catch (Throwable t) {
diff --git
a/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
b/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
index 0c6a65f6e3..107aecae66 100644
---
a/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
+++
b/webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
@@ -188,7 +188,7 @@ public class CompressionServletResponseWrapper
stream.close();
}
}
- } catch (IOException e) {
+ } catch (IOException ignore) {
// Ignore
}
}
diff --git a/webapps/examples/WEB-INF/classes/examples/FooTag.java
b/webapps/examples/WEB-INF/classes/examples/FooTag.java
index 8f2af8c146..676bf66eb7 100644
--- a/webapps/examples/WEB-INF/classes/examples/FooTag.java
+++ b/webapps/examples/WEB-INF/classes/examples/FooTag.java
@@ -79,8 +79,8 @@ public class FooTag extends ExampleTagBase {
pageContext.setAttribute("member", atts[i]);
i++;
return EVAL_BODY_BUFFERED;
- } catch (IOException ex) {
- throw new JspTagException(ex.toString());
+ } catch (IOException ioe) {
+ throw new JspTagException(ioe.toString());
}
}
}
diff --git a/webapps/examples/WEB-INF/classes/examples/LogTag.java
b/webapps/examples/WEB-INF/classes/examples/LogTag.java
index cc368c4e0a..3f0c492995 100644
--- a/webapps/examples/WEB-INF/classes/examples/LogTag.java
+++ b/webapps/examples/WEB-INF/classes/examples/LogTag.java
@@ -54,8 +54,8 @@ public class LogTag extends ExampleTagBase {
bodyOut.writeOut(bodyOut.getEnclosingWriter());
}
return SKIP_BODY;
- } catch (IOException ex) {
- throw new JspTagException(ex.toString());
+ } catch (IOException ioe) {
+ throw new JspTagException(ioe.toString());
}
}
}
diff --git a/webapps/examples/WEB-INF/classes/examples/ValuesTag.java
b/webapps/examples/WEB-INF/classes/examples/ValuesTag.java
index 7f63dee2a0..1459b0f411 100644
--- a/webapps/examples/WEB-INF/classes/examples/ValuesTag.java
+++ b/webapps/examples/WEB-INF/classes/examples/ValuesTag.java
@@ -71,8 +71,8 @@ public class ValuesTag extends TagSupport {
} else {
out.print("-1");
}
- } catch (IOException ex) {
- throw new JspTagException("IOException: " + ex.toString(), ex);
+ } catch (IOException ioe) {
+ throw new JspTagException("IOException: " + ioe.toString(), ioe);
}
return super.doEndTag();
}
diff --git a/webapps/examples/WEB-INF/classes/validators/DebugValidator.java
b/webapps/examples/WEB-INF/classes/validators/DebugValidator.java
index 90b799bfe9..359dfb840c 100644
--- a/webapps/examples/WEB-INF/classes/validators/DebugValidator.java
+++ b/webapps/examples/WEB-INF/classes/validators/DebugValidator.java
@@ -69,7 +69,7 @@ public class DebugValidator extends TagLibraryValidator {
break;
}
System.out.print((char) ch);
- } catch (IOException e) {
+ } catch (IOException ioe) {
break;
}
}
diff --git
a/webapps/examples/WEB-INF/classes/websocket/chat/ChatAnnotation.java
b/webapps/examples/WEB-INF/classes/websocket/chat/ChatAnnotation.java
index 43072ad370..4f98c434a0 100644
--- a/webapps/examples/WEB-INF/classes/websocket/chat/ChatAnnotation.java
+++ b/webapps/examples/WEB-INF/classes/websocket/chat/ChatAnnotation.java
@@ -125,14 +125,14 @@ public class ChatAnnotation {
for (ChatAnnotation client : connections) {
try {
client.sendMessage(msg);
- } catch (IOException e) {
+ } catch (IOException ioe) {
if (log.isDebugEnabled()) {
- log.debug("Chat Error: Failed to send message to client",
e);
+ log.debug("Chat Error: Failed to send message to client",
ioe);
}
if (connections.remove(client)) {
try {
client.session.close();
- } catch (IOException e1) {
+ } catch (IOException ignore) {
// Ignore
}
String message = String.format("* %s %s", client.nickname,
"has been disconnected.");
diff --git a/webapps/examples/WEB-INF/classes/websocket/drawboard/Client.java
b/webapps/examples/WEB-INF/classes/websocket/drawboard/Client.java
index a99aad0805..b5d8638d67 100644
--- a/webapps/examples/WEB-INF/classes/websocket/drawboard/Client.java
+++ b/webapps/examples/WEB-INF/classes/websocket/drawboard/Client.java
@@ -118,7 +118,7 @@ public class Client {
// Ideally, there should be some method that
cancels the connection
// immediately...
session.close(cr);
- } catch (IOException e) {
+ } catch (IOException ignore) {
// Ignore
}
@@ -208,7 +208,7 @@ public class Client {
// immediately...
try {
session.close();
- } catch (IOException ex) {
+ } catch (IOException ignore) {
// Ignore
}
}
diff --git a/webapps/examples/WEB-INF/classes/websocket/drawboard/Room.java
b/webapps/examples/WEB-INF/classes/websocket/drawboard/Room.java
index 7fe0267b76..8fc79ccea0 100644
--- a/webapps/examples/WEB-INF/classes/websocket/drawboard/Room.java
+++ b/webapps/examples/WEB-INF/classes/websocket/drawboard/Room.java
@@ -201,7 +201,9 @@ public final class Room {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
try {
ImageIO.write(roomImage, "PNG", bout);
- } catch (IOException e) { /* Should never happen */ }
+ } catch (IOException ignore) {
+ // Should never happen
+ }
// Send the image as binary message.
diff --git
a/webapps/examples/WEB-INF/classes/websocket/echo/EchoAnnotation.java
b/webapps/examples/WEB-INF/classes/websocket/echo/EchoAnnotation.java
index 7cb3aa64b8..67172fb9eb 100644
--- a/webapps/examples/WEB-INF/classes/websocket/echo/EchoAnnotation.java
+++ b/webapps/examples/WEB-INF/classes/websocket/echo/EchoAnnotation.java
@@ -38,10 +38,10 @@ public class EchoAnnotation {
if (session.isOpen()) {
session.getBasicRemote().sendText(msg, last);
}
- } catch (IOException e) {
+ } catch (IOException ioe) {
try {
session.close();
- } catch (IOException e1) {
+ } catch (IOException ignore) {
// Ignore
}
}
@@ -54,10 +54,10 @@ public class EchoAnnotation {
if (session.isOpen()) {
session.getBasicRemote().sendBinary(bb, last);
}
- } catch (IOException e) {
+ } catch (IOException ioe) {
try {
session.close();
- } catch (IOException e1) {
+ } catch (IOException iognore) {
// Ignore
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]