Re: RFR: 8282008: Incorrect handling of quoted arguments in ProcessBuilder [v3]

2022-02-27 Thread Maxim Kartashev
On Fri, 18 Feb 2022 17:21:48 GMT, Olga Mikhaltsova wrote: >> This fix made equal processing of strings such as ""C:\\Program >> Files\\Git\\"" before and after JDK-8250568. >> >> For example, it's needed to execute the following command on Windows: >> `C:\Windows\SysWOW64\WScript.exe

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v7]

2022-02-27 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { >

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
K. On Sun, Feb 27, 2022, 7:03 PM David Holmes wrote: > On 28/02/2022 8:20 am, Ethan McCue wrote: > > My understanding is that when you System.exit all threads associated > > with the JVM process are killed. That's what I meant by "nuclear > > Thread.interrupt". > > The process is terminated,

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread David Holmes
On 28/02/2022 8:20 am, Ethan McCue wrote: My understanding is that when you System.exit all threads associated with the JVM process are killed. That's what I meant by "nuclear Thread.interrupt". The process is terminated, the threads are not individually "killed". All Thread.interrupt does

Re: RFR: JDK-8282144 RandomSupport.convertSeedBytesToLongs sign extension overwrites previous bytes

2022-02-27 Thread Jim Laskey
On Fri, 25 Feb 2022 19:58:13 GMT, Brian Burkhalter wrote: >> Class: ./java.base/share/classes/jdk/internal/util/random/RandomSupport.java >> Method: public static long[] convertSeedBytesToLongs(byte[] seed, int n, int >> z) >> >> The method attempts to create an array of longs by consuming

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
My understanding is that when you System.exit all threads associated with the JVM process are killed. That's what I meant by "nuclear Thread.interrupt". It's the same issue as was raised about System.exit implicitly ending control flow or implicitly closing open file handles - a process could be

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread David Holmes
On 28/02/2022 3:20 am, Ethan McCue wrote: I think continuations could work for the single threaded case, depending on their behavior with "finally" blocks. I'm sure there are more caveats once we add another thread to the mix though. System.exit is a nuclear Thread.interrupt, so replicating that

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Andrew Haley
On 2/26/22 22:14, Ethan McCue wrote: As called out in JEP 411, one of the remaining legitimate uses of the Security Manager is to intercept calls to System.exit. This seems like a decent use case for the Scope Local mechanism. It could well be. One problem, at least in the preview version of

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
I think continuations could work for the single threaded case, depending on their behavior with "finally" blocks. I'm sure there are more caveats once we add another thread to the mix though. System.exit is a nuclear Thread.interrupt, so replicating that behavior might be a bit daunting

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Glavo
I think there is a problem with this: `System.exit` contains semantics to interrupt the flow of control and exit, and if you implement it that way, you might have some program abnormally execute parts of it that should never be executed. Of course, using exceptions like this should solve part of

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Ethan McCue
That undermines my point some, but I think the overall shape of the use case still makes sense On Sun, Feb 27, 2022 at 8:01 AM Remi Forax wrote: > Hi Ethan, > there is a far simpler solution, call org.apache.ivy.run(args, true) > instead of org.apache.ivy.main(args) in your tool provider. > >

Re: Should System.exit be controlled by a Scope Local?

2022-02-27 Thread Remi Forax
Hi Ethan, there is a far simpler solution, call org.apache.ivy.run(args, true) instead of org.apache.ivy.main(args) in your tool provider. regards, RĂ©mi - Original Message - > From: "Ethan McCue" > To: "core-libs-dev" > Sent: Saturday, February 26, 2022 11:14:19 PM > Subject: Should