From fbda77dd1807e5520c8aedf611021f44456311c2 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Fri, 18 Jul 2025 22:57:34 +0300 Subject: [PATCH] [PATCH] Fix @code typos in javadoc --- src/java.base/share/classes/javax/crypto/Cipher.java | 6 +++--- .../classes/javax/crypto/spec/HKDFParameterSpec.java | 4 ++-- .../access/foreign/MappedMemoryUtilsProxy.java | 4 ++-- .../jdk/internal/foreign/abi/fallback/LibFallback.java | 6 +++--- .../jdk/internal/util/regex/CaseFolding.java.template | 2 +- .../classes/javax/management/NumericValueExp.java | 4 ++-- .../share/classes/jdk/vm/ci/hotspot/CompilerToVM.java | 10 +++++----- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/java.base/share/classes/javax/crypto/Cipher.java b/src/java.base/share/classes/javax/crypto/Cipher.java index 22dc66127e2d6..f6960f2f2c348 100644 --- a/src/java.base/share/classes/javax/crypto/Cipher.java +++ b/src/java.base/share/classes/javax/crypto/Cipher.java @@ -291,7 +291,7 @@ protected Cipher(CipherSpi cipherSpi, } /** - * Creates a {code Cipher} object. Called internally by {code NullCipher}. + * Creates a {@code Cipher} object. Called internally by {@code NullCipher}. * * @param cipherSpi the delegate * @param transformation the transformation @@ -2720,7 +2720,7 @@ public static final int getMaxAllowedKeyLength(String transformation) } /** - * Returns an {code AlgorithmParameterSpec} object which contains + * Returns an {@code AlgorithmParameterSpec} object which contains * the maximum {@code Cipher} parameter value according to the * jurisdiction policy file. If JCE unlimited strength jurisdiction * policy files are installed or there is no maximum limit on the @@ -2728,7 +2728,7 @@ public static final int getMaxAllowedKeyLength(String transformation) * {@code null} will be returned. * * @param transformation the cipher transformation - * @return an {code AlgorithmParameterSpec} object which holds the maximum + * @return an {@code AlgorithmParameterSpec} object which holds the maximum * value or {@code null} * @throws NullPointerException if {@code transformation} * is {@code null} diff --git a/src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java index c4ca9e1e183f2..b8e84382cc7a2 100644 --- a/src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java +++ b/src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java @@ -112,7 +112,7 @@ public Extract extractOnly() { * * @implNote HKDF implementations will enforce that the length * is not greater than 255 * HMAC length. HKDF implementations - * will also enforce that a {code null} info value is treated as + * will also enforce that a {@code null} info value is treated as * zero-length byte array. * * @param info @@ -261,7 +261,7 @@ static Builder ofExtract() { * @implNote HKDF implementations will enforce that the length is * not greater than 255 * HMAC length. Implementations will also * enforce that the prk argument is at least as many bytes as the - * HMAC length. Implementations will also enforce that a {code null} + * HMAC length. Implementations will also enforce that a {@code null} * info value is treated as zero-length byte array. * * @param prk diff --git a/src/java.base/share/classes/jdk/internal/access/foreign/MappedMemoryUtilsProxy.java b/src/java.base/share/classes/jdk/internal/access/foreign/MappedMemoryUtilsProxy.java index eb5cf3884701f..0abfbe36a48a9 100644 --- a/src/java.base/share/classes/jdk/internal/access/foreign/MappedMemoryUtilsProxy.java +++ b/src/java.base/share/classes/jdk/internal/access/foreign/MappedMemoryUtilsProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ import java.io.FileDescriptor; /** - * This proxy interface is required to allow access to @{code MappedMemoryUtils} methods from {@code ScopedMemoryAccess}. + * This proxy interface is required to allow access to {@code MappedMemoryUtils} methods from {@code ScopedMemoryAccess}. * This allows to avoid pesky initialization issues in the middle of memory mapped scoped methods. */ public interface MappedMemoryUtilsProxy { diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallback.java b/src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallback.java index 6fe8dd5f91ccf..591cc746a218b 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallback.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/fallback/LibFallback.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,7 +102,7 @@ static void doDowncall(MemorySegment cif, MemorySegment target, MemorySegment re /** * Wrapper for {@code ffi_prep_cif} * - * @param returnType a pointer to an @{code ffi_type} describing the return type + * @param returnType a pointer to an {@code ffi_type} describing the return type * @param numArgs the number of arguments * @param paramTypes a pointer to an array of pointers, which each point to an {@code ffi_type} describing a * parameter type @@ -122,7 +122,7 @@ static MemorySegment prepCif(MemorySegment returnType, int numArgs, MemorySegmen /** * Wrapper for {@code ffi_prep_cif_var}. The variadic version of prep_cif * - * @param returnType a pointer to an @{code ffi_type} describing the return type + * @param returnType a pointer to an {@code ffi_type} describing the return type * @param numFixedArgs the number of fixed arguments * @param numTotalArgs the number of total arguments * @param paramTypes a pointer to an array of pointers, which each point to an {@code ffi_type} describing a diff --git a/src/java.base/share/classes/jdk/internal/util/regex/CaseFolding.java.template b/src/java.base/share/classes/jdk/internal/util/regex/CaseFolding.java.template index 8ffbde6c535bb..ca82850f6d3be 100644 --- a/src/java.base/share/classes/jdk/internal/util/regex/CaseFolding.java.template +++ b/src/java.base/share/classes/jdk/internal/util/regex/CaseFolding.java.template @@ -65,7 +65,7 @@ public final class CaseFolding { * back-refs, string slice (sequences), single, family(char-property) and class range. Single and * family may appears independently or within a class. *

- * For loose/case-insensitive matching, the back-refs, slices and singles apply {code toUpperCase} and + * For loose/case-insensitive matching, the back-refs, slices and singles apply {@code toUpperCase} and * {@code toLowerCase} to both the pattern and the input string. This effectively 'close' the class for * matching. *

diff --git a/src/java.management/share/classes/javax/management/NumericValueExp.java b/src/java.management/share/classes/javax/management/NumericValueExp.java index b748bb6e6296f..1cc78411653e4 100644 --- a/src/java.management/share/classes/javax/management/NumericValueExp.java +++ b/src/java.management/share/classes/javax/management/NumericValueExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,7 @@ class NumericValueExp extends QueryEval implements ValueExp { public NumericValueExp() { } - /** Creates a new NumericValue representing the numeric literal @{code val}.*/ + /** Creates a new NumericValue representing the numeric literal {@code val}.*/ NumericValueExp(Number val) { this.val = val; diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java index b25f7a092560c..f9fbadd5e5e3a 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -484,7 +484,7 @@ 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 @@ -512,17 +512,17 @@ 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} 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 */