changeset 16141:6a8da2c37469

8169645: ObjectInputFilter Config spec is ambiguous regarding overriding the filter via System properties Reviewed-by: bpb
author rriggs
date Wed, 23 Nov 2016 11:47:29 -0500
parents ff6e7619daf8
children ba41440d6e2b
files src/java.base/share/classes/java/io/ObjectInputFilter.java
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/io/ObjectInputFilter.java	Wed Nov 23 10:20:05 2016 -0500
+++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java	Wed Nov 23 11:47:29 2016 -0500
@@ -194,11 +194,17 @@
      * When setting the filter, it should be stateless and idempotent,
      * reporting the same result when passed the same arguments.
      * <p>
-     * The filter is configured using the {@link java.security.Security}
-     * property {@code jdk.serialFilter} and can be overridden by
-     * the System property {@code jdk.serialFilter}.
-     *
-     * The syntax is the same as for the {@link #createFilter(String) createFilter} method.
+     * The filter is configured during the initialization of the {@code ObjectInputFilter.Config}
+     * class. For example, by calling {@link #getSerialFilter() Config.getSerialFilter}.
+     * If the system property {@code jdk.serialFilter} is defined, it is used
+     * to configure the filter.
+     * If the system property is not defined, and the {@link java.security.Security}
+     * property {@code jdk.serialFilter} is defined then it is used to configure the filter.
+     * Otherwise, the filter is not configured during initialization.
+     * The syntax for each property is the same as for the
+     * {@link #createFilter(String) createFilter} method.
+     * If a filter is not configured, it can be set with
+     * {@link #setSerialFilter(ObjectInputFilter) Config.setSerialFilter}.
      *
      * @since 9
      */