Integrated: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI

2021-04-15 Thread Conor Cleary
On Fri, 9 Apr 2021 13:15:16 GMT, Conor Cleary wrote: > ### Description > This fix is part of a previous effort to both cleanup/modernise JNDI code, > the details of which can be seen in > [JDK-8048091](https://bugs.openjdk.java.net/browse/JDK-8048091). A number > JND

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI [v2]

2021-04-13 Thread Conor Cleary
On Tue, 13 Apr 2021 09:34:15 GMT, Conor Cleary wrote: >> src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java line >> 223: >> >>> 221: */ >>> 222: private final ClassLoader getContextClassLoader() { >>> 223: Privileg

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI [v3]

2021-04-13 Thread Conor Cleary
> the issues above resulting primarily in more readable/concise code. Conor Cleary has updated the pull request incrementally with one additional commit since the last revision: 8048199: Cleaner syntak in getContextClassLoader - Changes: - all: https://git.

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI [v2]

2021-04-13 Thread Conor Cleary
On Mon, 12 Apr 2021 16:44:16 GMT, Aleksei Efimov wrote: >> Conor Cleary has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update copyright headers >> - Tidied up lambdas > > src/java.na

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI [v2]

2021-04-12 Thread Conor Cleary
> the issues above resulting primarily in more readable/concise code. Conor Cleary has updated the pull request incrementally with two additional commits since the last revision: - Update copyright headers - Tidied up lambdas - Changes: - all: https://git.

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI [v2]

2021-04-12 Thread Conor Cleary
On Fri, 9 Apr 2021 16:30:05 GMT, Roger Riggs wrote: >> Thanks for the suggestion Roger, I think the `privilegedGetProperty(prop, >> default)` for the `getProperty()` method looks great. >> >> WRT to using it for `getInt()` and `getLong()`, I think its reasonable to >> use other means for thes

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI

2021-04-09 Thread Conor Cleary
On Fri, 9 Apr 2021 13:46:46 GMT, Roger Riggs wrote: >> ### Description >> This fix is part of a previous effort to both cleanup/modernise JNDI code, >> the details of which can be seen in >> [JDK-8048091](https://bugs.openjdk.java.net/browse/JDK-8048091). A number >> JNDI methods under `java.n

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI

2021-04-09 Thread Conor Cleary
On Fri, 9 Apr 2021 14:01:32 GMT, Roger Riggs wrote: >> That is a very neat alternative yes. Approaching the problem like that >> especially improves the readability >> [JdkLDAP.java](https://github.com/openjdk/jdk/pull/3416/files#diff-bf4c67da93cf2b9196508db2d57f7e01bc884f2268f5bfd43a9f01dfd55e

Re: RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI

2021-04-09 Thread Conor Cleary
On Fri, 9 Apr 2021 13:45:03 GMT, Roger Riggs wrote: >> src/java.naming/share/classes/com/sun/jndi/ldap/LdapPoolManager.java line >> 401: >> >>> 399: return AccessController.doPrivileged( >>> 400: (PrivilegedAction) () -> >>> System.getProperty(propName, defVal) >>> 401:

RFR: 8048199: Replace anonymous inner classes with lambdas, where applicable, in JNDI

2021-04-09 Thread Conor Cleary
### Description This fix is part of a previous effort to both cleanup/modernise JNDI code, the details of which can be seen in [JDK-8048091](https://bugs.openjdk.java.net/browse/JDK-8048091). A number JNDI methods under `java.naming` use Anonymous Inner Classes in cases where only a single obje

Re: RFR: 8255583: Investigate creating a test to trigger the condition in KeepAliveStreamCleaner

2020-12-07 Thread Conor Cleary
On Mon, 7 Dec 2020 11:08:37 GMT, Conor Cleary wrote: >> test/jdk/sun/net/www/http/KeepAliveStreamCleaner/KeepAliveStreamCleanerTestDriver.java >> line 26: >> >>> 24: /* >>> 25: * @test >>> 26: * @modules java.base/sun.net.www.http >> &

Re: RFR: 8255583: Investigate creating a test to trigger the condition in KeepAliveStreamCleaner

2020-12-07 Thread Conor Cleary
On Mon, 7 Dec 2020 10:55:06 GMT, Daniel Fuchs wrote: >> The KeepAliveStreamCleaner in sun.net.ww.http package had been previously >> seen to fail with an IllegalMonitorStateException. This failure was caused >> by the use of `wait()` in a non synchronized block. This failure was >> mitigated t

RFR: 8255583: Investigate creating a test to trigger the condition in KeepAliveStreamCleaner

2020-12-07 Thread Conor Cleary
The KeepAliveStreamCleaner in sun.net.ww.http package had been previously seen to fail with an IllegalMonitorStateException. This failure was caused by the use of `wait()` in a non synchronized block. This failure was mitigated through use of `await()` instead as is shown below (code can be view