On Wed, 3 Dec 2025 09:28:39 GMT, Jaikiran Pai <[email protected]> wrote:

> As far as I remember, we have similar text in some API specification for 
> methods that return a copy of the array, reusing that text might be useful 
> (I'll try and find such an instance).

`javax.net.ssl.SSLParameters` has a few APIs which word this in a couple of 
different ways:

https://docs.oracle.com/en/java/javase/25/docs/api/java.base/javax/net/ssl/SSLParameters.html#getCipherSuites()

Returns:
    a copy of the array of ciphersuites or null if none have been set.


https://docs.oracle.com/en/java/javase/25/docs/api/java.base/javax/net/ssl/SSLParameters.html#getApplicationProtocols()

This method will return a new array each time it is invoked.

I prefer the "a copy of the array of ..." style, but I'll let Sean and others 
decide how to word this.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28615#issuecomment-3605950544

Reply via email to