Re: RFR: JDK-8277795: ldap connection timeout not honoured under contention [v2]

2021-11-26 Thread Rob McKenna
On Fri, 26 Nov 2021 10:50:57 GMT, Daniel Fuchs wrote: > What testing is there for this fix? I've just added a test modelled on LdapTimeoutTest.java. (with some whitespace issues which I'm about to fix!) > src/java.naming/share/classes/com/sun/jndi/ldap/LdapClientFactory.java line > 71: > >>

Re: RFR: JDK-8277795: ldap connection timeout not honoured under contention [v2]

2021-11-26 Thread Rob McKenna
> This fix attemps to resolve an issue where threads can stack up on each other > while waiting to get a connection from the ldap pool to an unreachable > server. It does this by having each thread start a countdown prior to holding > the pools' lock. (which has been changed to a ReentrantLock)

Re: RFR: 8276766: Enable jar and jmod to produce deterministic timestamped content [v4]

2021-11-26 Thread Lance Andersen
On Thu, 25 Nov 2021 17:57:20 GMT, Andrew Leonard wrote: >> test/jdk/tools/jar/JarEntryTime.java line 129: >> >>> 127: // Make a jar file from that directory structure with >>> 128: // --source-date set to epoch seconds 1647302400 (15/03/2022) >>> 129: long sourceDate =

Re: RFR: 8276766: Enable jar and jmod to produce deterministic timestamped content [v4]

2021-11-26 Thread Lance Andersen
On Fri, 26 Nov 2021 12:23:41 GMT, Sean Coffey wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/Main.java line 2290: >> >>> 2288: private void setSourceDate(ZipEntry e, long origTime) { >>> 2289: if (sourceDate != -1) { >>> 2290:

Re: RFR: 8277868: Use Comparable.compare() instead of surrogate code

2021-11-26 Thread Daniel Fuchs
On Fri, 26 Nov 2021 12:46:59 GMT, Сергей Цыпанов wrote: > Instead of something like > > long x; > long y; > return (x < y) ? -1 : ((x == y) ? 0 : 1); > > we can use `return Long.compare(x, y);` > > All replacements are done with IDE. Changes to java.net look good. Please obtain approval from

Re: Adding an @Immutable annotation to Java

2021-11-26 Thread Rob Spoor
If this is really something that's desired, then why use an annotation when there's a keyword already available: const. However, there's a reason that's never been actually used in Java, and that's because it's so hard to get right. On 26/11/2021 00:11, Alan Snyder wrote: I like the idea of

Re: String.indexOf(single-char-String)

2021-11-26 Thread Michael Bien
added benchmark results for OpenJDK's StringIndexOf benchmark: https://github.com/openjdk/jdk/pull/6509#issuecomment-979985594 -michael On 25.11.21 15:05, Michael Bien wrote: Hello again, I was trying to run JDK's benchmarks over night (second attempt actually) but had some difficulties to

RFR: 8277868: Use Comparable.compare() instead of surrogate code

2021-11-26 Thread Сергей Цыпанов
Instead of something like long x; long y; return (x < y) ? -1 : ((x == y) ? 0 : 1); we can use `return Long.compare(x, y);` All replacements are done with IDE. - Commit messages: - 8277868: Use Comparable.compare() instead of surrogate code Changes:

Re: RFR: 8276766: Enable jar and jmod to produce deterministic timestamped content [v4]

2021-11-26 Thread Sean Coffey
On Wed, 24 Nov 2021 16:56:35 GMT, Lance Andersen wrote: >> Andrew Leonard has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains five commits: >> >> - 8276766: Enable jar and jmod to produce deterministic timestamped content >> >>

Re: RFR: JDK-8277795: ldap connection timeout not honoured under contention

2021-11-26 Thread Daniel Fuchs
On Thu, 25 Nov 2021 23:54:18 GMT, Rob McKenna wrote: > This fix attemps to resolve an issue where threads can stack up on each other > while waiting to get a connection from the ldap pool to an unreachable > server. It does this by having each thread start a countdown prior to holding > the

Integrated: 8277659: [TESTBUG] Microbenchmark ThreadOnSpinWaitProducerConsumer.java hangs

2021-11-26 Thread Stuart Monteith
On Thu, 25 Nov 2021 11:57:52 GMT, Stuart Monteith wrote: > Fix java/lang/ThreadOnSpinWaitProducerConsumer by waiting for consumer thread > to finish before restarting trial method. This pull request has now been integrated. Changeset: 3383c0dc Author:Stuart Monteith Committer: Nick