On Wed, 4 Mar 2026 20:06:05 GMT, Andrei Rybak <[email protected]> wrote:
> Incorrect usages of Javadoc syntax `{@code}` and `{@link}` in documentation
> comments in various Java classes have been fixed.
>
> These issues were found using various `git grep` commands, such as:
>
> git grep -F '{code' -- '*.java'
> git grep -F '{link' -- '*.java'
> git grep -F '@{' -- '*.java'
>
> ----
>
> Originally, I also included a fix for the file
> `src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java`,
> but after I realized that it is imported from elsewhere, I opened a pull
> request in the upstream repository:
> <https://github.com/apache/santuario-xml-security-java/pull/575>. In the copy
> of this class in the OpenJDK repository, the HTML tag `<code>` was replaced
> with `{@code ...}` in commit 9adabc35b09 ("8177334: Update xmldsig
> implementation to Apache Santuario 2.1.1", 2018-06-19), but the Apache
> repository doesn't have this change (both [branch
> main](https://github.com/apache/santuario-xml-security-java/blob/main/src/main/java/org/apache/xml/security/signature/Manifest.java#L223-L230)
> and [branch
> 2.1.x-fixes](https://github.com/apache/santuario-xml-security-java/blob/2.1.x-fixes/src/main/java/org/apache/xml/security/signature/Manifest.java#L226-L233)
> still have `<code>`).
>
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK
> Interim AI Policy](https://openjdk.org/legal/ai).
Force pushed after a rebase onto `master` to resolve a trivial merge conflict:
file
`src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java:` was
removed in commit 2acf0dc98a8 (8382582: Remove the experimental JVMCI feature,
2026-05-26).
Range diff:
$ git range-diff 744efd11fad~5..744efd11fad 58998a288b~5..58998a288b
1: 0fbf58d8ff4 < -: ----------- 8372353: API to compute the byte length of a
String encoded in a given Charset
-: ----------- > 1: ca52afa38e4 8384833: Start of release updates for JDK 28
8384838: Add SourceVersion.RELEASE_28 8384842: Add source 28 and target 28 to
javac
2: 597e77399b7 ! 2: 2b8e0c3f3a6 Fix Javadoc syntax @{code ...} -> {@code ...}
@@ src/java.management/share/classes/javax/management/NumericValueExp.java:
class N
{
this.val = val;
- ##
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java ##
-@@
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java: int
getNumIndyEntries(HotSpotConstantPool constantPool) {
-
- /**
- * Resolves the details for invoking the bootstrap method associated
with the
-- * {@code CONSTANT_Dynamic_info} or @{code
CONSTANT_InvokeDynamic_info} entry at {@code cpi} in
-+ * {@code CONSTANT_Dynamic_info} or {@code
CONSTANT_InvokeDynamic_info} entry at {@code cpi} in
- * {@code constant pool}.
- *
- * The return value encodes the details in an object array that is
described by the pseudo Java
-@@
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java:
Object[] resolveBootstrapMethod(HotSpotConstantPool constantPool, int cpi) {
-
- /**
- * Gets the constant pool index of a static argument of a {@code
CONSTANT_Dynamic_info} or
-- * @{code CONSTANT_InvokeDynamic_info} entry. Used when the list of
static arguments in the
-+ * {@code CONSTANT_InvokeDynamic_info} entry. Used when the list of
static arguments in the
- * {@link BootstrapMethodInvocation} is a {@code
List<PrimitiveConstant>} of the form
- * {{@code arg_count}, {@code pool_index}}, meaning the arguments are
not already resolved and that
- * the JDK has to lookup the arguments when they are needed. The
{@code cpi} corresponds to
- * {@code pool_index} and the {@code index} has to be smaller than
{@code arg_count}.
- *
- * The behavior of this method is undefined if {@code cpi} does not
denote an entry representing
-- * a {@code CONSTANT_Dynamic_info} or a @{code
CONSTANT_InvokeDynamic_info}, or if the index
-+ * a {@code CONSTANT_Dynamic_info} or a {@code
CONSTANT_InvokeDynamic_info}, or if the index
- * is out of bounds.
- *
-- * @param cpi the index of a {@code CONSTANT_Dynamic_info} or @{code
CONSTANT_InvokeDynamic_info} entry
-+ * @param cpi the index of a {@code CONSTANT_Dynamic_info} or {@code
CONSTANT_InvokeDynamic_info} entry
- * @param index the index of the static argument in the list of
static arguments
- * @return the constant pool index associated with the static argument
- */
-
## test/jdk/tools/jar/JarExtractTest.java ##
@@ test/jdk/tools/jar/JarExtractTest.java: public void
testExtractToAbsoluteDir(final String dest) throws Exception {
}
3: bc97fd004bf = 3: 7b934f68576 Fix Javadoc syntax {code ...} -> {@code ...}
4: 954b0cb32c4 = 4: e128c5f3630 Fix Javadoc syntax {link ...} -> {@link ...}
5: 744efd11fad = 5: 58998a288b2 Fix Javadocs syntax {@linkplain ...}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/30061#issuecomment-4625358806