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 [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 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 [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
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 [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

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: 8263552: Use String.valueOf() for char-to-String conversion in ObjectStreamClass

2021-03-13 Thread Conor Cleary
On Sat, 20 Feb 2021 12:17:32 GMT, Сергей Цыпанов wrote: > This is a very simple and trivial improvement about getting rid of pointless > char wrapping into array src/java.base/share/classes/java/io/ObjectStreamClass.java line 833: > 831: String fname = in.readUTF(); > 832:

Integrated: 8256154: Some TestNG tests require default constructors

2020-11-23 Thread Conor Cleary
On Thu, 19 Nov 2020 13:50:30 GMT, Conor Cleary wrote: > In TestNG 7, it is a requirement that TestNG is able to create a Test object > using a default constructor. > > This simple fix addresses two such classes so that this requirement is > satisfied by inserting default const

Integrated: 8256183: InputStream.skipNBytes is missing @since 12

2020-11-20 Thread Conor Cleary
On Thu, 19 Nov 2020 12:35:04 GMT, Conor Cleary wrote: > InputStream.skipNBytes is missing `@since 12` tag which was not added during > the review of [JDK-6516099](https://bugs.openjdk.java.net/browse/JDK-6516099). > > This small fix adds the `@since` tag to InputStream.skipNByte

Re: RFR: 8256154: Some TestNG tests require default constructors

2020-11-20 Thread Conor Cleary
On Thu, 19 Nov 2020 16:44:52 GMT, Lance Andersen wrote: >> `depth` is `final`, so it needs to be assigned. but this could be replaced >> with `this(0)` > > Ah, missed the final on depth :-) Any particular strengths associated with `this(0)` as opposed to the actual assignment? Aside from the b

Re: RFR: 8256154: Some TestNG tests require default constructors

2020-11-20 Thread Conor Cleary
On Thu, 19 Nov 2020 15:09:30 GMT, Daniel Fuchs wrote: > Hi Conor, > > Were you able to verify that the two tests passed properly (and non > trivially) with both the current version of TestNG as well as the new version? > > best regards, > > -- daniel Hi Daniel, Yes, I was able to verify tha

RFR: 8256154: Some TestNG tests require default constructors

2020-11-19 Thread Conor Cleary
In TestNG 7, it is a requirement that TestNG is able to create a Test object using a default constructor. This simple fix addresses two such classes so that this requirement is satisfied by inserting default construtors. Example: `public GetPackages() { ... }` test/jdk/java/lang/Package/GetPa

RFR: 8256183: InputStream.skipNBytes is missing @since 12

2020-11-19 Thread Conor Cleary
InputStream.skipNBytes is missing `@since 12` tag which was not added during the review of [JDK-6516099](https://bugs.openjdk.java.net/browse/JDK-6516099). This small fix adds the `@since` tag to InputStream.skipNBytes - Commit messages: - 8256183: InputStream.skipNBytes is missing

Re: RFR: 8250859: Address reliance on default constructors in the Accessibility APIs [v2]

2020-09-17 Thread Conor Cleary
On Wed, 16 Sep 2020 08:52:35 GMT, Chris Hegarty wrote: > The CSR lists `com.sun.java.accessibility.util.SwingEventMonitor` as being > changed, but I cannot find that class in > this PR. Changes to this class were indeed missing. This has now been addressed. Thanks for spotting that! -

Re: RFR: 8250859: Address reliance on default constructors in the Accessibility APIs [v2]

2020-09-17 Thread Conor Cleary
.accessibility.util.AccessibilityListenerList > - Default ctor on com.sun.java.accessibility.util.EventID > > specdiff: > http://cr.openjdk.java.net/~ccleary/issues/webrevs-store/8250859/webrevs/webrev.00/specdiff/overview-summary.html > bug: > https://bugs.openjdk.java.net/browse/J

RFR: 8250859: Address reliance on default constructors in the Accessibility APIs

2020-09-15 Thread Conor Cleary
This issue relates to JDK-8250639 '☂ Address reliance on default constructors in the java.desktop module'. The following classes have had an explicit no-arg constructor added, with a protected access modifier and accompanying API description: - Default ctor on com.sun.java.accessibility.util.Swi

Re: RFR: 8250859: Address reliance on default constructors in the Accessibility APIs

2020-09-15 Thread Conor Cleary
On Tue, 15 Sep 2020 10:04:49 GMT, Conor Cleary wrote: > This issue relates to JDK-8250639 '☂ Address reliance on default constructors > in the java.desktop module'. The > following classes have had an explicit no-arg constructor added, with a > protected access modifie

RFR[8243655]: 'Map.replace javadoc code snippet typo'

2020-06-05 Thread Conor Cleary
Hi, Could someone please take a look at my webrev for JDK-8243655 'Map.replace javadoc code snippet typo'? This fix addresses a typo in the javadoc for Map.replace(K, V, V) in the default implementation code. The parameter 'value' in the conditional block is changed to 'oldValue' to reflect

RFR[8245658]: 'Arrays.java has two occurrences of bad unicode constants in Javadoc.'

2020-05-29 Thread Conor Cleary
Hi, Could someone please review my webrev for JDK-8245658 'Arrays.java has two occurrences of bad unicode constants in Javadoc.'? In Arrays.java Javadoc, there were two instances of bad Unicode formatting where the null character constant was incorrectly specified with '\u000' (another zero

RFR(xs): 8245970: IntStream.html#reduce doc should not mention average

2020-05-29 Thread Conor Cleary
Hi, The method-level documentation of Intstream::reduce(int, IntBinaryOperator) mentions the average function as a case of reduction even though the function cannot be used with the reduce method. This might cause confusion, this fix therefore removes the mention of the average function from