[jdk17u-dev] RFR: 8302111: Serialization considerations [v3]

Goetz Lindenmaier goetz at openjdk.org
Fri Feb 21 06:47:52 UTC 2025


On Thu, 20 Feb 2025 16:16:04 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> My inital desing was 
>> throw new InvalidObjectException("Invalid encoding").initCause(e);
>> But the compiler does not like this:
>> error: unreported exception Throwable; must be caught or declared to be thrown
>> So I decided to add the try/catch with the null check.
>
> I see... strange. But it does compile without the null check. I think it should be removed.

I'll remove the null check in both places where I added initCause().

-------------

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/3278#discussion_r1964937495


More information about the jdk-updates-dev mailing list