Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 18, 19
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289666 | 17.0.5-oracle | Srinivas Mandalika | P4 | Resolved | Fixed | b01 |
JDK-8291837 | 17.0.5 | Goetz Lindenmaier | P4 | Resolved | Fixed | b02 |
JDK-8289662 | 11.0.17-oracle | Srinivas Mandalika | P4 | Resolved | Fixed | b01 |
JDK-8291849 | 11.0.17 | Goetz Lindenmaier | P4 | Resolved | Fixed | b02 |
JDK-8289700 | 8u351 | Srinivas Mandalika | P4 | Resolved | Fixed | b01 |
Description
Issue
JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD.
It returns a space (" ") instead of the correct word.
The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane.
While working on this test case there was a related bug relevant to this
The issue described in
It returns a space (" ") instead of correct word.
Hence an additional test was added for this, for verifying the behavior of getBeforeIndex.
This test verifies the fix for this behavior by checking the getBeforeIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane.
The two tests have multiple distinct assertions. For this reason as well as maintainability of the tests the two were not clubbed into a single test.
However, as the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review.
This review is for migrating tests from a closed test suite to open.
Testing:
The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64.
Attachments
Issue Links
- backported by
-
JDK-8289662 Create an automated test for JDK-4170173
- Resolved
-
JDK-8289666 Create an automated test for JDK-4170173
- Resolved
-
JDK-8289700 Create an automated test for JDK-4170173
- Resolved
-
JDK-8291837 Create an automated test for JDK-4170173
- Resolved
-
JDK-8291849 Create an automated test for JDK-4170173
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/9180dcb9
-
Commit openjdk/jdk17u-dev/6bfe87dc
-
Commit openjdk/jdk/6db2e16b
-
Review openjdk/jdk11u-dev/1304
-
Review openjdk/jdk17u-dev/621
-
Review openjdk/jdk/8138