On Tue, 19 Oct 2021 13:48:33 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Roger's review suggestion - rethrow the RuntimeException instead of 
>> wrapping in ExceptionInInitializerError
>
> src/java.base/share/classes/java/io/ObjectInputFilter.java line 641:
> 
>> 639:                             "Error configuring filter: {0}", (Object) 
>> re);
>> 640:                     // Do not continue if configuration not initialized
>> 641:                     throw new ExceptionInInitializerError(re);
> 
> Just re-throw the RuntimeException.  
> It will be caught by the caller of the static initialize and wrapped in 
> ExceptioninInitializerError.
> 
> I don't think a CSR is needed since this exception is not part of an API.

Done. Updated the PR. Test continues to pass.

I had copy/pasted the wrapping into `ExceptioninInitializerError` from a few 
lines down, in that code. But looking at it more closely now, I guess, that 
other line which is throwing the `ExceptioninInitializerError` is doing that 
because what's being thrown in that block can potentially be a `Throwable`.

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

PR: https://git.openjdk.java.net/jdk/pull/5988

Reply via email to