As described in OpenJDK email, constructing an exception to extract the class and method is expensive.
Using the StackWalker API is more direct and efficient.
See
http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-August/061987.html
Using the StackWalker API is more direct and efficient.
See
http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-August/061987.html