Re: RFR 8207750 : Native handle leak in java.io.WinNTFileSystem.list()

2018-07-18 Thread Bernd Eckenfels
Hello, I am not sure about the JNi conventions, but does the jObjectArray rv need to be released as local reference in some of the early returns as well? Gruss Bernd Gruss Bernd -- http://bernd.eckenfels.net Von: -1031249216m Auftrag von Gesendet: Mittwoch, Jul

any movement on fixing the breakage of logback MDC with CompletableFutures?

2018-07-18 Thread Dean Hiller
I wanted to revisit the fact that MDC of logback broke in java's CompletableFuture while it works just fine with scala twitter Future because of their Local.scala class that acts like a ThreadLocal BUT for Futures transferring context. There is basically no way to fix it except by threading in som

RFR 8207753 : Handle to process snapshot is leaked if Process32First() fails

2018-07-18 Thread Ivan Gerasimov
Hello! In native functions java.lang.ProcessHandleImpl.getProcessPids0() and java.lang.ProcessHandleImpl.parent0() a handle to a snapshot of all processes in the system is obtained with CreateToolhelp32Snapshot(). This handle isn't releases if the subsequent call to Process32First() fails. W

Re: [RFC] StringBuilder.toCharArray

2018-07-18 Thread Martin Buchholz
You can already copy a StringBuilder's contents into a String or another StringBuilder. What would Josh say? "Doesn't pull its weight." ?! On Wed, Jul 18, 2018 at 7:29 AM, Isaac Levy wrote: > Is there any interest in a toCharArray method for StringBuilder? I'm > unable to to make a bug for it.

Re: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Xueming Shen
Ideally it would be preferred to move jar to a complete nio implementation and we then can leave the WindowsPath to take care of this stuff. That said that would be a relative big change. I do have a version on my disk but need clean up, test, performance measurement and review to get it. S

Re: [RFR] 8205525 : Improve exception messages during manifest parsing of jar archives

2018-07-18 Thread Alan Bateman
On 18/07/2018 09:21, Baesken, Matthias wrote: Hi Alan, I'll prepare a CSR . I selected a more general name "jdk.includeInExceptions" , because there is the idea to enhance more exceptions with additional output . In such a case " jdk.util.jar.includeInExceptions" would not really help .

RE: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Baesken, Matthias
Good point, I think I better keep the "good old" loop . Second webrev containing the suggestions of Goetz : http://cr.openjdk.java.net/~mbaesken/webrevs/8207395.1/ Best regards, Matthias > -Original Message- > From: Scott Palmer [mailto:swpal...@gmail.com] > Sent: Mittwoch, 18. Jul

Re: [PATCH] AbstractStringBuilder.append()

2018-07-18 Thread Isaac Levy
I think adding a dedicated method would help clarify and encourage performant code. For example, I sped up the snippet below after seeing that StringBuilder.append() has a fast path when the arg is another StringBuilder, which isn't clear from the javadoc. public class ScalaSB implements java.la

[RFC] StringBuilder.toCharArray

2018-07-18 Thread Isaac Levy
Is there any interest in a toCharArray method for StringBuilder? I'm unable to to make a bug for it. Just a bit of sugar: char[] toCharArray() { int length = length(); char[] dst = new char[length]; getChars(0, length, dst, 0); return dst; } Regards, Isaac

Re: [PATCH] regex matcher opt: remove redundant StringBuilder

2018-07-18 Thread Isaac Levy
I still think it would be valuable to land a patch for replaceAll to avoid temporary StringBuilders, is there anyone who wants to help me land it? Isaac On Sun, Apr 29, 2018 at 10:24 PM, Isaac Levy wrote: > Your patch looks good to me, and will get the majority of performance > benefits without

Re: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Roger Riggs
Hi, Is there any chance that just using java.nio.file.Path.of will do the needed cleanup?  (or Paths.get) It seems a shame to spread this kind of adhoc fixup around? $0.02, Roger On 7/18/2018 5:31 AM, Lindenmaier, Goetz wrote: Hi Matthias, thanks for doing this fix. I think this can be not

Re: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Scott Palmer
That gives a different result. Original: "///" -> “/" replaceAll: "///" -> “//" > On Jul 18, 2018, at 7:18 AM, Baesken, Matthias > wrote: > > Hi Götz, thanks for the input ! > Should we maybe use > > dir.replaceAll > > and not the while loop ? > >> while (dir.in

RE: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Baesken, Matthias
Hi Götz, thanks for the input ! Should we maybe use dir.replaceAll and not the while loop ? > while (dir.indexOf("//") > -1) { > dir = dir.replace("//", "/"); > } Best regards, Matthias > -Original Message--

RE: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Lindenmaier, Goetz
Hi Matthias, thanks for doing this fix. I think this can be noted down a bit better, avoiding duplicating the loop. Also, please remove the redundant dir.replace(File.separatorChar, '/'). dir = dir.replace(File.separatorChar, '/'); +String unc =

RE: [RFR] 8205525 : Improve exception messages during manifest parsing of jar archives

2018-07-18 Thread Baesken, Matthias
> The name of the security/system property will need discussion as > "jdk.includeInExceptions" is very general. If we have something general > then we'll need a good name and replace the existing > jdk.net.includeInExceptions. It might be better to go with something > specific for the area such as

RFR(S): 8207766: [testbug] Adapt tests for Aix.

2018-07-18 Thread Lindenmaier, Goetz
Hi, I would like to fix these tests to run on aix: http://cr.openjdk.java.net/~goetz/wr18/8207766-aixTestFixes/01/ MulticastSocket tests Opened bug and asked IBM to fix. Put on ProblemList. See https://bugs.openjdk.java.net/browse/JDK-8207404 EvalArraysAsList.sh Quotes need to be escaped o