RFR: 8276609: Document setting property `jdk.serialFilter` to an invalid value throws `ExceptionInInitializerError`
Jaikiran Pai
jpai at openjdk.java.net
Wed Nov 10 02:10:38 UTC 2021
On Tue, 9 Nov 2021 15:48:22 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> When set on the command line `jdk.serialFilter` to an invalid value, the invalid value is logged but the application is allowed to start without setting the filter.
> This leaves the application without the protections of the serial filter.
> The specification should be clarify that an `ExceptionInInitializerError` is thrown when the `jdk.serialFilter` system property is set on the command line to an invalid value.
src/java.base/share/classes/java/io/ObjectInputFilter.java line 528:
> 526: * The filter is created as if {@link #createFilter(String) createFilter} is called;
> 527: * if the filter string is invalid, an {@link ExceptionInInitializerError} is thrown.
> 528: * Otherwise, the filter is not configured during initialization and
Hello Roger, the new line looks good to me. However, with this new line now staying between the "If the Java virtual machine ..." and the "Otherwise, ..." lines, I had to re-read this "Otherwise, the filter is not ..." line a few times to see which "if" it corresponds to, because there's a "if the filter string is invalid" on the previous line.
Do you think these lines might have to be rearranged?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6317
More information about the core-libs-dev
mailing list