https://issues.apache.org/bugzilla/show_bug.cgi?id=53936

--- Comment #2 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(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() {
          throwable.fillInStackTrace();
        }
      };
(...)
  }

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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to