mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K
Reviewed-by: lancea, naoto
This commit is contained in:
parent
d0d26f5c55
commit
e9b2c058a4
21 changed files with 229 additions and 128 deletions
|
@ -560,7 +560,6 @@ public interface ObjectInputFilter {
|
|||
* fully qualified class name of the deserialization filter factory.
|
||||
* @since 9
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
final class Config {
|
||||
/**
|
||||
* Lock object for filter and filter factory.
|
||||
|
@ -628,19 +627,17 @@ public interface ObjectInputFilter {
|
|||
*/
|
||||
|
||||
// Get the values of the system properties, if they are defined
|
||||
String factoryClassName = StaticProperty.jdkSerialFilterFactory();
|
||||
if (factoryClassName == null) {
|
||||
// Fallback to security property
|
||||
factoryClassName = AccessController.doPrivileged((PrivilegedAction<String>) () ->
|
||||
@SuppressWarnings("removal")
|
||||
String factoryClassName = StaticProperty.jdkSerialFilterFactory() != null
|
||||
? StaticProperty.jdkSerialFilterFactory()
|
||||
: AccessController.doPrivileged((PrivilegedAction<String>) () ->
|
||||
Security.getProperty(SERIAL_FILTER_FACTORY_PROPNAME));
|
||||
}
|
||||
|
||||
String filterString = StaticProperty.jdkSerialFilter();
|
||||
if (filterString == null) {
|
||||
// Fallback to security property
|
||||
filterString = AccessController.doPrivileged((PrivilegedAction<String>) () ->
|
||||
@SuppressWarnings("removal")
|
||||
String filterString = StaticProperty.jdkSerialFilter() != null
|
||||
? StaticProperty.jdkSerialFilter()
|
||||
: AccessController.doPrivileged((PrivilegedAction<String>) () ->
|
||||
Security.getProperty(SERIAL_FILTER_PROPNAME));
|
||||
}
|
||||
|
||||
traceFilters = GetBooleanAction.privilegedGetProperty(SERIAL_FILTER_TRACE_PROPNAME);
|
||||
|
||||
|
@ -743,6 +740,7 @@ public interface ObjectInputFilter {
|
|||
*/
|
||||
public static void setSerialFilter(ObjectInputFilter filter) {
|
||||
Objects.requireNonNull(filter, "filter");
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(ObjectStreamConstants.SERIAL_FILTER_PERMISSION);
|
||||
|
@ -836,6 +834,7 @@ public interface ObjectInputFilter {
|
|||
*/
|
||||
public static void setSerialFilterFactory(BinaryOperator<ObjectInputFilter> filterFactory) {
|
||||
Objects.requireNonNull(filterFactory, "filterFactory");
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null) {
|
||||
sm.checkPermission(ObjectStreamConstants.SERIAL_FILTER_PERMISSION);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue