This is an automated email from the ASF dual-hosted git repository. markt 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 a8233ca ByteBufferUtils.cleanDirectBuffer invocation failures are logged a8233ca is described below commit a8233ca8f16663cea1a4f09d4fd90166ac480f12 Author: Carter Kozak <cko...@ckozak.net> AuthorDate: Wed Sep 11 15:45:24 2019 -0700 ByteBufferUtils.cleanDirectBuffer invocation failures are logged Previously cleanMethod failures were ignored entirely, and invokeCleanerMethod failures were logged to stderr using Throwable.printStackTrace(). Now debug logging may be enabled to capture this information using the configured logging framework. --- java/org/apache/tomcat/util/buf/ByteBufferUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/ByteBufferUtils.java b/java/org/apache/tomcat/util/buf/ByteBufferUtils.java index 8365d22..0937230 100644 --- a/java/org/apache/tomcat/util/buf/ByteBufferUtils.java +++ b/java/org/apache/tomcat/util/buf/ByteBufferUtils.java @@ -125,15 +125,18 @@ public class ByteBufferUtils { cleanMethod.invoke(cleanerMethod.invoke(buf)); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | SecurityException e) { - // Ignore + if (log.isDebugEnabled()) { + log.debug(sm.getString("byteBufferUtils.cleaner"), e); + } } } else if (invokeCleanerMethod != null) { try { invokeCleanerMethod.invoke(unsafe, buf); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | SecurityException e) { - // Ignore - e.printStackTrace(); + if (log.isDebugEnabled()) { + log.debug(sm.getString("byteBufferUtils.cleaner"), e); + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org