I think it is a good point, Mike. Some of the exception constructors do not accept cause parameters, for example UnrecoverableKeyException. And some others do, for example InvalidKeyException. I would like to keep original cause. I read this patch as a format clean-up. It is fine to me to have an additional update to take the causes back. But I appreciate if Andrey could take care of the update in the PR as well.
Xuelei > On Apr 6, 2022, at 10:43 AM, Mike StJohns <mstjo...@comcast.net> wrote: > > Before you approve this, why would you rethrow just the message rather than > the actual original cause? Seems like you’re losing debug info including the > type of the original exception for no good reason. > > Mike > > Sent from my iPad > >> On Apr 6, 2022, at 11:26, Xue-Lei Andrew Fan <xue...@openjdk.java.net> wrote: >> >> On Fri, 1 Apr 2022 07:32:21 GMT, Andrey Turbanov <aturba...@openjdk.org> >> wrote: >> >>> Let's take advantage of Java 7 language feature - "Catching Multiple >>> Exception Types". >>> It simplifies code. Reduces duplication. >>> Found by IntelliJ IDEA inspection `Identical 'catch' branches in 'try' >>> statement` >> >> Looks good to me. >> >> ------------- >> >> Marked as reviewed by xuelei (Reviewer). >> >> PR: https://git.openjdk.java.net/jdk/pull/8068 > >