On Tue, 29 Oct 2024 15:18:42 GMT, Alexey Ivanov <[email protected]> wrote:

> After updating documentation for `PassFailJFrame.java` in 
> [JDK-8340785](https://bugs.openjdk.org/browse/JDK-8340785) / #21162, jtreg 
> interprets the file as a test because it finds `@test` tag in the file. This 
> results in a failed test.
> 
> I didn't find a way to avoid this problem when using [`@snippet` 
> feature](https://docs.oracle.com/en/java/javase/21/javadoc/programmers-guide-snippets.html#GUID-1B435AA6-84D5-4693-AF5E-6470EEE970FC)
>  of the javadoc (see also [JavaDoc Code Snippet API - Sip of 
> Java](https://inside.java/2022/04/04/sip46/), so I used the old friends 
> `<pre><code>`.
> 
> Now, `@` is represented as an HTML character entity, and jtreg no longer 
> finds the `@test` marker in the file.
> 
> With this update, I inlined the end comment into the same code block with `/` 
> represented as a character entity. This makes the jtreg tags comment 
> complete, ready to copy and paste.
> 
> I've updated the generated javadoc for 
> [`PassFailJFrame`](https://cr.openjdk.org/~aivanov/PassFailJFrame/api/PassFailJFrame.html);
>  this version includes javadoc for 
> [`WindowLayouts`](https://cr.openjdk.org/~aivanov/PassFailJFrame/api/WindowLayouts.html).

This pull request has now been integrated.

Changeset: 7bca0af4
Author:    Alexey Ivanov <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/7bca0af481e2ab1d9576fdf400079b4e4ca91e89
Stats:     6 lines in 1 file changed: 2 ins; 0 del; 4 mod

8343128: PassFailJFrame.java test result: Error. Bad action for script: build}

Use HTML character entity in javadoc to prevent jtreg from recognising
PassFailJFrame.java as a test file.

Reviewed-by: azvegint, honkar

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

PR: https://git.openjdk.org/jdk/pull/21766

Reply via email to