On Fri, 21 Jan 2022 13:39:06 GMT, Michael Osipov <d...@openjdk.java.net> wrote:
>> Actually, it turns out I should be throwing `NamingException` here. That is >> what was being thrown by `TlsChannelBinding.parseType` before and an >> existing test was expecting that. NamingException only takes a String >> message. So, there won't be a root cause exception. > > `NamingException` has `setRootCause()`. Why not use that? I use that one too > and full stack is retained. Yes, I can do that. Though it will cause the existing LDAP channel binding test to fail which is checking for an empty root cause. That is checking unspecified behavior and I can change it to check for a `ChannelBindingException` as root cause. So long as we are okay having a non public exception type as the root cause, it's probably helpful to have the full stack there. ------------- PR: https://git.openjdk.java.net/jdk/pull/7065