Re: RFR: 8276609: Document setting property `jdk.serialFilter` to an invalid value throws `ExceptionInInitializerError`

2021-11-12 Thread Lance Andersen
On Tue, 9 Nov 2021 15:48:22 GMT, Roger Riggs  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.

Marked as reviewed by lancea (Reviewer).

-

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


Re: RFR: 8276609: Document setting property `jdk.serialFilter` to an invalid value throws `ExceptionInInitializerError`

2021-11-12 Thread Roger Riggs
On Wed, 10 Nov 2021 02:06:42 GMT, Jaikiran Pai  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?

Good suggestion, I'll take that up in a new issue related to incomplete 
initialization.

-

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


Re: RFR: 8276609: Document setting property `jdk.serialFilter` to an invalid value throws `ExceptionInInitializerError`

2021-11-12 Thread Daniel Fuchs
On Tue, 9 Nov 2021 15:48:22 GMT, Roger Riggs  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.

Marked as reviewed by dfuchs (Reviewer).

-

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


Re: RFR: 8276609: Document setting property `jdk.serialFilter` to an invalid value throws `ExceptionInInitializerError`

2021-11-09 Thread Jaikiran Pai
On Tue, 9 Nov 2021 15:48:22 GMT, Roger Riggs  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