In JDK code sometimes old-style initialization Throwable.cause is used - via Throwable.initCause call.
Instead of initCause, cause exception could be passed via constructor parameter.
It makes code shorter and easier to read. In some cases it allows to avoid ugly casts.
Instead of initCause, cause exception could be passed via constructor parameter.
It makes code shorter and easier to read. In some cases it allows to avoid ugly casts.