JDK-8268615 : (doc) Errata in javadoc for ObjectInputFilter Example
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2021-06-11
  • Updated: 2021-07-09
  • Resolved: 2021-07-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17Resolved
Related Reports
Relates :  
Description
The example code in ObjectInputFilter prose does not match the code
with respect to the bootstrap class loader: 

"Example, to create a filter that will allow any class loaded from the platform classloader.
     ObjectInputFilter f = allowFilter(cl -> cl.getClassLoader() == ClassLoader.getPlatformClassLoader()
                                          || cl.getClassLoader() == null, Status.UNDECIDED);
"

Comments
The correction was made in jdk-8268826.
09-07-2021