Subject: Re: ObjectInputFilter.Config::createFilter
From: Roger Riggs <[email-masked]>
To: Elena Votchennikova <[email-masked]>
Cc: Dmitry Bessonov <[email-masked]>
Date: Wed, 23 Nov 2016 12:58:08 -0500

Yes, it is redundant, not a separate assertion.

On 11/23/2016 12:47 PM, Elena
Votchennikova wrote:

Hm…

For these cases we have the following assertion:
“null if no patterns”

But we also have assertion “may be null;” - probably this assertion is excess?
This assertion really looks like absolutely separated assertion which states that the result may be null independently of conditions.

Thank you,
Elena

On 23 Nov 2016, at 20:39, Roger Riggs <[email-masked]> wrote:

Hi Elena,

It will non-null if there any pattern that produces a filter.

The return should be null for strings like:
""
";"
";;;;;"
They are non-empty but have no patterns.

Strings with a mix of empty and non-empty patterns should return non-null, such as:
"abc;"
";abc"
"abc;;def"
"abc;;;;;def;;;;;;"

Roger

On 11/23/2016 12:01 PM, Elena Votchennikova wrote:

Hi Roger,

Could you please confirm that the return statement means that the return value will be null if no patterns or it might be null if there are patterns, and the second case is unpredictable?
“Returns: a filter to check a class being deserialized; may be null; null if no patterns”

Thank you,
Elena