On Thu, 24 Jun 2021 09:11:12 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> 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); Hard to spot that mis-use. Also observed that if the jdk.serialFilter is ill formed (IAE), it gets logged but should also rethrow the exception to prevent continuing without an expected filter. ------------- PR: https://git.openjdk.java.net/jdk17/pull/85