This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new a0b928427a Fix Javadoc warning
a0b928427a is described below
commit a0b928427a621a61a859d665c084963fba3bea68
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Mar 10 10:48:05 2025 +0000
Fix Javadoc warning
---
java/org/apache/catalina/valves/ExtendedAccessLogValve.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
b/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
index 268a56b414..e5483ecbad 100644
--- a/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
+++ b/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
@@ -91,18 +91,15 @@ public class ExtendedAccessLogValve extends AccessLogValve {
// -------------------------------------------------------- Private Methods
/**
- * Wrap the incoming value with double quotes (") and escape any double
quotes appearing in the value using two
- * double quotes ("").
+ * Calls toString() on the object, wraps the result with double quotes (")
and writes the result to the buffer. Any
+ * double quotes appearing in the value are escaped using two double
quotes (""). If the value is null or if
+ * toString() fails, '-' will be written to the buffer.
*
* @param value - The value to wrap
* @param buf the buffer to write to
- *
- * @return '-' if null. Otherwise, toString() will be called on the object
and the value will be wrapped in quotes
- * and any quotes will be escaped with 2 sets of quotes.
*/
static void wrap(Object value, CharArrayWriter buf) {
String svalue;
- // Does the value contain a " ? If so must encode it
if (value == null || "-".equals(value)) {
buf.append('-');
return;
@@ -119,6 +116,7 @@ public class ExtendedAccessLogValve extends AccessLogValve {
buf.append('\"');
if (!svalue.isEmpty()) {
+ // Does the value contain a " ? If so must encode it
escapeAndAppend(svalue, buf, true);
}
buf.append('\"');
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]