ノート
[BUG] 8366058: Outdated comment in WinCAPISeedGenerator
Windows 95 についての古いコメントを削除しました。
概要#
Windows 向けの WinCAPISeedGenerator.c では,MS CryptoAPI から乱数シードを取得する nativeGenerateSeed が定義されています1。
このメソッドの直前には,以下のように Windows 95 の初期バージョンに関するコメントが残っていました2。
/*
* Get a random seed from the MS CryptoAPI. Return true if successful, false
* otherwise.
*
* Some early versions of Windows 95 do not support the required functions.
* Use runtime linking to avoid problems.
*
*/
しかし,JDK では既に Windows 95 をサポートしていません。 そのため,現在の実装を理解するうえでこのコメントは有用ではなく,むしろ「Windows 95 への配慮がまだ必要なのか」という誤解を招く恐れがありました。
今回の修正では,この古くなった Windows 95 についてのコメントだけを削除しました3。
コードの挙動は変更していないため,テストを追加する種類の変更ではなく,JBS には noreg-doc を付与しました。
2025/11/02 JBS で発見#
本バグを JBS で発見し,対象ファイルを確認しました。
問題のコメントは nativeGenerateSeed の説明コメントの一部として残っていましたが,現在サポートされる Windows とは関係がありません。
修正内容はコメントの削除のみです。 以下の 4 行を削除し,メソッド説明だけを残しました4。
- *
- * Some early versions of Windows 95 do not support the required functions.
- * Use runtime linking to avoid problems.
- *
PR 作成直後は core-libs ラベルが自動で付与されましたが,対象はセキュリティ系のネイティブ実装であるため,Alan Bateman5 氏により security ラベルへ変更されました。
2026/01/05 レビュー#
Sean Mullan6 氏にレビューをいただき,Approve されました。
また,あわせて JBS に noreg-doc ラベルを付与するようコメントをいただき,追加しました。
問題ないことを確認して,統合リクエストを行いました。
2026/01/05 統合#
Mullan6 氏に /sponsor をしていただき eee58547 として JDK へ統合されました。
Footnotes#
-
jdk/src/java.base/windows/native/libjava/WinCAPISeedGenerator.c at e8a1a8707ee6192c85ac62a2a51c815e07613c38 · openjdk/j…JDK main-line development https://openjdk.org/projects/jdk - jdk/src/java.base/windows/native/libjava/WinCAPISeedGenerator.c at e8a1a8707ee6192c85ac62a2a51c815e07613c38 · openjdk/…GitHub
↩
-
jdk/src/java.base/windows/native/libjava/WinCAPISeedGenerator.c at e8a1a8707ee6192c85ac62a2a51c815e07613c38 · openjdk/j…JDK main-line development https://openjdk.org/projects/jdk - jdk/src/java.base/windows/native/libjava/WinCAPISeedGenerator.c at e8a1a8707ee6192c85ac62a2a51c815e07613c38 · openjdk/…GitHub
↩
-
8366058: Outdated comment in WinCAPISeedGenerator by PeyaPeyaPeyang · Pull Request #28105 · openjdk/jdkJDK main-line development https://openjdk.org/projects/jdk - 8366058: Outdated comment in WinCAPISeedGenerator by PeyaPeyaPeyang · Pull Request #28105 · openjdk/jdkGitHub
↩
-
8366058: Outdated comment in WinCAPISeedGenerator by PeyaPeyaPeyang · Pull Request #28105 · openjdk/jdkRemoved comment about Windows 95 runtime linking, since Windows 95 is no longer supported: Some early versions of Windows 95 do not support the required functions. Use runtime lin…GitHub
↩
-
https://openjdk.org/census#alanbopenjdk.org↩
-
https://openjdk.org/census#mullanopenjdk.org↩ ↩2
-
8366058: Outdated comment in WinCAPISeedGenerator · openjdk/jdk@eee5854JDK main-line development https://openjdk.org/projects/jdk - 8366058: Outdated comment in WinCAPISeedGenerator · openjdk/jdk@eee5854GitHub
↩