Note
[BUG] 8357880: Typo in code formatting for Cipher.getMaxAllowedParameterSpec
Fixed a typo in the code tag in the JavaDoc for the Cipher class.
Summary#
In the JavaDoc for javax.crypto.Cipher, {@code ...} is used to denote inline code. However, in some comments, the @ was missing, resulting in a format of {code ...}1.
The affected areas were the description of the constructor called internally by NullCipher and the description of getMaxAllowedParameterSpec. With this typo present, the code would not be formatted correctly on JavaDoc pages, displaying as plain text like {code Cipher} or {code AlgorithmParameterSpec}.
In this fix, we corrected these instances to include the missing @, thus properly applying the inline tag in JavaDoc2.
- * Creates a {code Cipher} object. Called internally by {code NullCipher}.
+ * Creates a {@code Cipher} object. Called internally by {@code NullCipher}.
- * Returns an {code AlgorithmParameterSpec} object which contains
+ * Returns an {@code AlgorithmParameterSpec} object which contains
- * @return an {code AlgorithmParameterSpec} object which holds the maximum
+ * @return an {@code AlgorithmParameterSpec} object which holds the maximum
This is a documentation typo correction that does not affect code behavior.
Discovered on JBS 2025/11/05#
The bug was discovered on JBS, and upon verification of the affected sections in Cipher.java, it was found that {code ...} should have been {@code ...}. A pull request to correct this issue was created3.
There were three changes made, affecting only one file: src/java.base/share/classes/javax/crypto/Cipher.java. The Pull Request Bot's pre-checks passed successfully and the security label was assigned.
Reviewed on 2025/11/05#
The pull request was reviewed by Francesco Andreuzzi and Sean Mullan, both of whom approved the changes4.
After review, /integrate was executed, and the change with commit 408ea855 is now awaiting sponsorship.
Integrated on 2025/11/05#
The pull request was sponsored by Weijun Wang via /sponsor, and it was integrated into JDK with commit d5831ed[^6].
Footnotes#
-
jdk/src/java.base/share/classes/javax/crypto/Cipher.java at 0737a5625269773dcf70b95f8b8ac90b3b6cc444 · openjdk/jdkJDK main-line development https://openjdk.org/projects/jdk - jdk/src/java.base/share/classes/javax/crypto/Cipher.java at 0737a5625269773dcf70b95f8b8ac90b3b6cc444 · openjdk/jdkGitHub
↩
-
8357880: Code formatting typo in Cipher.getMaxAllowedParameterSpec by PeyaPeyaPeyang · Pull Request #28145 · openjdk/jdkFix JavaDoc typos in Cipher class: correct {code ...} to {@code ...} in the constructor and getMaxAllowedParameterSpec() Progress Change must be properly reviewed (1 review requir…GitHub
↩
-
8357880: Code formatting typo in Cipher.getMaxAllowedParameterSpec by PeyaPeyaPeyang · Pull Request #28145 · openjdk/jdkJDK main-line development https://openjdk.org/projects/jdk - 8357880: Code formatting typo in Cipher.getMaxAllowedParameterSpec by PeyaPeyaPeyang · Pull Request #28145 · openjdk/j…GitHub
↩
-
8357880: Fix typos in Javadoc for Cipher class · openjdk/jdk@408ea85JDK main-line development https://openjdk.org/projects/jdk - 8357880: Fix typos in Javadoc for Cipher class · openjdk/jdk@408ea85GitHub
↩
-
8357880: Code formatting typo in Cipher.getMaxAllowedParameterSpec · openjdk/jdk@d5831edJDK main-line development https://openjdk.org/projects/jdk - 8357880: Code formatting typo in Cipher.getMaxAllowedParameterSpec · openjdk/jdk@d5831edGitHub
↩