Skip to content

Commit ac7430c

Browse files
author
Roger Riggs
committed
8278044: ObjectInputStream methods invoking the OIF.CFG.getSerialFilterFactory() silent about error cases.
Backport-of: 8c0bb53
1 parent db3d6d7 commit ac7430c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/java.base/share/classes/java/io/ObjectInputStream.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,13 @@ private static class Logging {
382382
* has written and flushed the header.
383383
*
384384
* <p>The constructor initializes the deserialization filter to the filter returned
385-
* by invoking the {@link Config#getSerialFilterFactory()} with {@code null} for the current filter
385+
* by invoking the serial filter factory returned from {@link Config#getSerialFilterFactory()}
386+
* with {@code null} for the current filter
386387
* and the {@linkplain Config#getSerialFilter() static JVM-wide filter} for the requested filter.
387388
* If the serial filter or serial filter factory properties are invalid
388389
* an {@link IllegalStateException} is thrown.
390+
* When the filter factory {@code apply} method is invoked it may throw a runtime exception
391+
* preventing the {@code ObjectInputStream} from being constructed.
389392
*
390393
* <p>If a security manager is installed, this constructor will check for
391394
* the "enableSubclassImplementation" SerializablePermission when invoked
@@ -423,10 +426,13 @@ public ObjectInputStream(InputStream in) throws IOException {
423426
* implementation of ObjectInputStream.
424427
*
425428
* <p>The constructor initializes the deserialization filter to the filter returned
426-
* by invoking the {@link Config#getSerialFilterFactory()} with {@code null} for the current filter
429+
* by invoking the serial filter factory returned from {@link Config#getSerialFilterFactory()}
430+
* with {@code null} for the current filter
427431
* and the {@linkplain Config#getSerialFilter() static JVM-wide filter} for the requested filter.
428432
* If the serial filter or serial filter factory properties are invalid
429433
* an {@link IllegalStateException} is thrown.
434+
* When the filter factory {@code apply} method is invoked it may throw a runtime exception
435+
* preventing the {@code ObjectInputStream} from being constructed.
430436
*
431437
* <p>If there is a security manager installed, this method first calls the
432438
* security manager's {@code checkPermission} method with the

0 commit comments

Comments
 (0)