Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-21 Thread Weijun Wang
On Fri, 20 Aug 2021 23:01:27 GMT, Lance Andersen wrote: >> This change modifies the default value of the `java.security.manager` system >> property from "allow" to "disallow". This means unless it's explicitly set >> to "allow", any call to `System.setSecurityManager()` would throw an UOE. >>

Re: Process for adding default method to javax.naming.Context?

2021-08-21 Thread Alan Bateman
On 20/08/2021 17:03, Laird Nelson wrote: On Fri, Aug 20, 2021 at 3:13 AM Alan Bateman > wrote: I think you are asking for an overload that specifies a class literal as a type token to avoid an explicit cast at the use-sites. Yes, that's right.

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-21 Thread Alan Bateman
On Sat, 21 Aug 2021 11:23:54 GMT, Weijun Wang wrote: >> src/java.base/share/classes/java/lang/SecurityManager.java line 128: >> >>> 126: * null >>> 127: * None >>> 128: * Always throws {@code UnsupportedOperationException} >> >> Not sure "Always" is needed, could just be "Throws UOE" >

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v3]

2021-08-21 Thread Mandy Chung
> This reimplements core reflection with method handles. > > For `Constructor::newInstance` and `Method::invoke`, the new implementation > uses `MethodHandle`. For `Field` accessor, the new implementation uses > `VarHandle`.For the first few invocations of one of these reflective > methods

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v3]

2021-08-21 Thread Mandy Chung
On Sat, 21 Aug 2021 22:37:05 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementation uses >> `VarHandle`.For the

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-21 Thread Weijun Wang
On Sat, 21 Aug 2021 16:59:39 GMT, Alan Bateman wrote: >> This is the same as the existing words for "disallow". > > I think I agree with Lance that "Throws UOE" would be clearer in this table. Suggestion accepted. - PR: https://git.openjdk.java.net/jdk/pull/5204

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v3]

2021-08-21 Thread Mandy Chung
On Sat, 21 Aug 2021 22:37:05 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementation uses >> `VarHandle`.For the

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v3]

2021-08-21 Thread Claes Redestad
On Sat, 21 Aug 2021 22:37:05 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementation uses >> `VarHandle`.For the

Re: RFR: 8271820: Implementation of JEP 416: Reimplement Core Reflection with Method Handle [v3]

2021-08-21 Thread liach
On Sat, 21 Aug 2021 22:37:05 GMT, Mandy Chung wrote: >> This reimplements core reflection with method handles. >> >> For `Constructor::newInstance` and `Method::invoke`, the new implementation >> uses `MethodHandle`. For `Field` accessor, the new implementation uses >> `VarHandle`.For the

Re: Process for adding default method to javax.naming.Context?

2021-08-21 Thread Laird Nelson
On Sat, Aug 21, 2021 at 9:49 AM Alan Bateman wrote: > JNDI dates from 1997 and came into the JDK in Java SE 1.3. > Yes; I remember it well. :-) > There have been very few API changes since then. There hasn't been any > significant interest (to my knowledge anyway) in re-investing and > moderni

RFR: 8272805: Avoid looking up standard charsets

2021-08-21 Thread Sergey Bylokhov
This is the continuation of JDK-8233884, JDK-8271456, and JDK-8272120. See https://github.com/openjdk/jdk/pull/5063 and https://github.com/openjdk/jdk/pull/4951 In many places standard charsets are looked up via their names, for example: absolutePath.getBytes("UTF-8"); This could be done more ef