[jdk17] RFR: JDK-8268826: Cleanup Override in Context-Specific Deserialization Filters [v4]
Daniel Fuchs
dfuchs at openjdk.java.net
Thu Jun 24 09:14:27 UTC 2021
On Wed, 23 Jun 2021 19:12:06 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Remove the unnecessary special case "OVERRIDE" in jdk.serialFilterFactory property.
>> Fix description in the example of a filter allowing platform classes.
>> Suppress some warnings about use of SecurityManager in tests.
>
> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>
> Improve exception cases and messages when the jdk.serialFilterFactory
> is misconfigured and test those faults.
> Fix typo in java.security-extra-factory test config
src/java.base/share/classes/java/io/ObjectInputFilter.java line 643:
> 641: } catch (RuntimeException re) {
> 642: configLog.log(ERROR,
> 643: "Error configuring filter: {0}", re);
You should either remove "{0}" from the string, or cast re to `Object` - as there is an overridden log method that takes a Throwable. If you want to display the exception stack trace, just call:
configLog.log(ERROR, "Error configuring filter", re);
If you don't want to display the stack trace, call:
configLog.log(ERROR, "Error configuring filter: {0}", (Object)re);
-------------
PR: https://git.openjdk.java.net/jdk17/pull/85
More information about the core-libs-dev
mailing list