On Mon, 25 Aug 2025 13:10:08 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> ScientificWare has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 25 commits:
>> 
>>  - Merge master
>>  - JDK-8314731 : Remove all indentations accidentally introduced by the 
>> previous commit.
>>  - Merge master
>>  - Merge master
>>  - jdk-8314731 : FormView Alt Support.
>>    
>>    FormView.java :
>>    - revert ALL unrelated changing to formatting.
>>    
>>    bug8314731.java :
>>    - Fix the test description.
>>    - Change where the user interface is created.
>>    - Add a finall block to be sure the Frame is disposed.
>>    - Replace "testPassed" with "testFailed".
>>  - Merge master
>>  - Replaces this title with "alt attribute test in HTML image type input".
>>    
>>    Moves this test to /jdk/test/jdk/javax/swing/text/html.
>>  - bug8314731.java : Corrects the CopyRight date.
>>  - FormView.java :
>>    Removes a whitespace
>>    
>>    bug8314731.java :
>>    Adds a newline at end of file.
>>  - getMaximumSpan(int axis) method
>>    doc -> Not used
>>    
>>    mouseReleased(MouseEvent evt) method
>>    elem and hdoc -> not used
>>    return -> could be removed, method returns void
>>    
>>    loadElementDataIntoBuffer(Element elem, StringBuilder buffer) method
>>    value != null -> name can't be null at this point
>>    
>>    getInputElementData(AttributeSet attr) method
>>    value = null -> Already set at null
>>  - ... and 15 more: https://git.openjdk.org/jdk/compare/69e664de...9b423808
>
> test/jdk/javax/swing/text/html/bug8314731.java line 66:
> 
>> 64:             testPassed = ContainsAlt(jEditorPane);
>> 65:         } finally {
>> 66:             SwingUtilities.invokeAndWait(new Runnable() {
> 
> Put this code directly into the `main` method instead of using `bug8314731` 
> constructor.
> 
> Taking other comments into account, I expect the `main` method to look like 
> this:
> 
> 
>     public static void main(String[] args) throws Exception {
>         try {
>             SwingUtilities.invokeAndWait(bug8314731::createAndSetVisibleUI);
>             SwingUtilities.invokeAndWait(() -> {
>                 if (!ContainsAlt(jEditorPane)) {
>                     throw new RuntimeException("FormView doesn't support the 
> alt attribute.");
>                 }
>             });
>         } finally {
>             SwingUtilities.invokeAndWait(() -> {
>                 if (jf != null) {
>                     jf.dispose();
>                 }
>             });
>         }
>     }
> 
> 
> Declare `containsAlt` static to be able to call it directly from `main`, 
> remove the `testPassed` field and the `bug8314731` constructor.

Addressed.

> test/jdk/javax/swing/text/html/bug8314731.java line 76:
> 
>> 74:     private static void createAndSetVisibleUI() {
>> 75: 
>> 76:         jEditorPane = new JEditorPane();
> 
> Suggestion:
> 
>     private static void createAndSetVisibleUI() {
>         jEditorPane = new JEditorPane();
> 
> There's no need for a blank line as the first line of a method.

Addressed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r2328675305
PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r2328675880

Reply via email to