mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8302815: Use new Math.clamp method in core libraries
Reviewed-by: alanb
This commit is contained in:
parent
5e1d1b7940
commit
3f3a1f534b
11 changed files with 37 additions and 45 deletions
|
@ -308,8 +308,8 @@ public class ObjectInputStream
|
|||
* The maximum number of interfaces allowed for a proxy is limited to 65535 by
|
||||
* {@link java.lang.reflect.Proxy#newProxyInstance(ClassLoader, Class[], InvocationHandler)}.
|
||||
*/
|
||||
static final int PROXY_INTERFACE_LIMIT = Math.max(0, Math.min(65535, GetIntegerAction
|
||||
.privilegedGetProperty("jdk.serialProxyInterfaceLimit", 65535)));
|
||||
static final int PROXY_INTERFACE_LIMIT = Math.clamp(GetIntegerAction
|
||||
.privilegedGetProperty("jdk.serialProxyInterfaceLimit", 65535), 0, 65535);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue