JDK-8278472 : Invalid value set to CANDIDATEFORM structure
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 8u131,11,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-12-09
  • Updated: 2025-07-10
  • Resolved: 2022-01-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 18 JDK 19 JDK 7 JDK 8 Other
11.0.16-oracleFixed 17.0.4-oracleFixed 18.0.1 b05Fixed 19Fixed 7u351Fixed 8u321Fixed openjdk8u462,shenandoah8u462Fixed
Related Reports
Relates :  
Relates :  
Description
According to the Windows API reference[1], dwStyle of CANDIDATEFORM structure should be set to CFS_CANDIDATEPOS or CFS_EXCLUDE. So, CFS_POINT is wrong here.
  
See line 3914 in src\java.desktop\windows\native\libawt\windows\awt_Component.cpp [2], AwtComponent::SetCandidateWindow function:
        CANDIDATEFORM cf;
        cf.dwStyle = CFS_POINT;
        ImmGetCandidateWindow(hIMC, 0, &cf);

[1] https://docs.microsoft.com/en-us/windows/win32/api/imm/ns-imm-candidateform
[2] https://github.com/openjdk/jdk/blob/f90425a1cbbc686045c87086af586e62f05f6c49/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp#L3914
Comments
[jdk8u-fix-request] Approval Request from Taizo Kurashige Small and trivial fix, low risk. Except for the fix for Copyright year and the path change, original patch applies cleanly. jdk_desktop tests on Windows Server 2022 passed (some tests failed, but they failed before this fix was made)
28-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk8u-dev/pull/648 Date: 2025-04-25 02:31:25 +0000
25-04-2025

Fix request [11u] I backport this for parity with 11.0.16-oracle. Small and trivial fix, low risk. Clean backport. SAP nightly testing passed.
23-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/934 Date: 2022-03-22 15:11:04 +0000
22-03-2022

Fix request [17u] I backport this for parity with 17.0.4-oracle. Small and trivial fix, low risk. Clean backport. SAP nightly testing passed.
22-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/267 Date: 2022-03-21 13:34:41 +0000
21-03-2022

Changeset: cd5a9a95 Author: Alexey Ivanov <aivanov@openjdk.org> Date: 2022-01-28 18:19:17 +0000 URL: https://git.openjdk.java.net/jdk18u/commit/cd5a9a95225645a46b95216edadb860df6c90824
28-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/6 Date: 2022-01-20 21:36:34 +0000
20-01-2022

Fix Request for 18u: It's a low-risk change that amends an incorrect value passed in the CANDIDATEFORM structure.
20-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7146 Date: 2022-01-19 20:14:34 +0000
19-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18/pull/54 Date: 2021-12-21 15:18:40 +0000
21-12-2021

The incorrect value was introduced by JDK-8147842 and then used in JDK-8183504.
21-12-2021