On Tue, 18 Jul 2023 05:05:24 GMT, Chen Liang <li...@openjdk.org> wrote:
>> Change one overload of java.lang.reflect.Array.newInstance to have an >> `@implSpec` of calling the other method. >> >> I choose not to use a snippet tag here is this code is semantically only one >> line and doesn't need to be cut-and-pasted. >> >> As adding an `@implSpec` is technically a (small) specification change, >> please also review the CSR: >> >> https://bugs.openjdk.org/browse/JDK-8312208 > > src/java.base/share/classes/java/lang/reflect/Array.java line 56: > >> 54: * as follows: >> 55: * <blockquote> >> 56: * {@code Array.newInstance(componentType, new int[]{length});} > > Snippet is not just for cut-and-paste; it can also save us a `<blockquote>` > tag as well, and syntax highlight support in IDEs. With the concession that more of the `<blockquote><pre>...</pre></blockquote>` blocks still in the JDK should be converted to snippets, I don't think that *all* of them should necessarily be converted. Having done a few snippet conversions myself (JDK-8287838, JDK-8289399, JDK-8289775, JDK-8308987), I don't think this particular one is justified as a snippet. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14917#discussion_r1267096100