tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53936] Minimize classloader leaks from stacktrace elements in long-lived Exceptions
Date Sun, 30 Sep 2012 17:40:52 GMT

--- Comment #2 from Konstantin Kolinko <> ---
(In reply to comment #0)
> The attached test code contains two versions of the algorithm, for Java 1.6
> and 1.7.

1. It is a bit hard to see, but looks that

1.6 version is "containerOnlyFill(Throwable)"
1.7 version is "bootclassLoaderOnlyFill(Throwable)"

Why are you using Throwable[]? It would make sense if you were returning a
different value than passing it, but you are not.  Just a simple

  public static void containerOnlyFill(final Throwable throwable) {
    try {
      Runnable target = new Runnable() {
        @Override public void run() {

would suffice.

2. What is the intended use of this code?

In those several cases when Tomcat creates and holds an exception, we already
solved the issue by implementing the fillInStackTrace() method as a NOOP.

See e.g. o.a.naming.resources.ImmutableNameNotFoundException.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message