This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new ba2c162d66 Remove use of printStackTrace
ba2c162d66 is described below

commit ba2c162d6690424da2d740aff435f4653e18d302
Author: remm <r...@apache.org>
AuthorDate: Mon Oct 2 15:17:13 2023 +0200

    Remove use of printStackTrace
---
 java/org/apache/tomcat/util/http/LocalStrings.properties | 1 +
 java/org/apache/tomcat/util/http/Parameters.java         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/LocalStrings.properties 
b/java/org/apache/tomcat/util/http/LocalStrings.properties
index f9b8e0d3d6..82d556b5d7 100644
--- a/java/org/apache/tomcat/util/http/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/http/LocalStrings.properties
@@ -26,6 +26,7 @@ parameters.bytes=Start processing with input [{0}]
 parameters.copyFail=Failed to create copy of original parameter values for 
debug logging purposes
 parameters.decodeFail.debug=Character decoding failed. Parameter [{0}] with 
value [{1}] has been ignored.
 parameters.decodeFail.info=Character decoding failed. Parameter [{0}] with 
value [{1}] has been ignored. Note that the name and value quoted here may be 
corrupted due to the failed decoding. Use debug level logging to see the 
original, non-corrupted values.
+parameters.duplicateFail=Failed to create copy of query parameters
 parameters.emptyChunk=Empty parameter chunk ignored
 parameters.fallToDebug=\n\
 \ Note: further occurrences of Parameter errors will be logged at DEBUG level.
diff --git a/java/org/apache/tomcat/util/http/Parameters.java 
b/java/org/apache/tomcat/util/http/Parameters.java
index a30922a37a..5555883614 100644
--- a/java/org/apache/tomcat/util/http/Parameters.java
+++ b/java/org/apache/tomcat/util/http/Parameters.java
@@ -221,7 +221,7 @@ public final class Parameters {
             decodedQuery.duplicate(queryMB);
         } catch (IOException e) {
             // Can't happen, as decodedQuery can't overflow
-            e.printStackTrace();
+            log.error(sm.getString("parameters.copyFail"), e);
         }
         processParameters(decodedQuery, queryStringCharset);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to