adoptium / adoptium/adoptium-support
Javadoc doubling up on TYPE_USE annotations.
- Dominant language
- No language data
- Stars
- 59
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
### Please provide a brief summary of the bug
When using TYPE_USE annotations (ie. @NotNull) with arrays and lists Javadoc is doubling down on the leading annotation.
For example:
With simple interface:
```
public interface TestInterface {
@NotNull List<@NotNull String> getStrings();
@NotNull String @NotNull [] getStringsAsArray();
void setStringsAsVarArgArray(@NotNull String @NotNull ... strings);
}
```
The generated Javadoc looks like the following (leading annotation always 2x)
```
@NotNull @NotNull List<@NotNull String> getStrings()
@NotNull @NotNull String @NotNull [] getStringsAsArray()
void setStringsAsVarArgArray(@NotNull @NotNull String @NotNull ... strings);
```
NOTE: The "Method Summary" table displays correctly; however, the "Method Details" does not.
### Please provide steps to reproduce where possible
I used the simple interface described above and imported the Jetbrains Annotations version for the NotNull annotation.
```
org.jetbrains
annotations
23.0.0
```
### Expected Results
I expect that the TYPE_USE annotation only appears once or rather as declared.
### Actual Results
The TYPE_USE annotation is doubled up on its first-occurrence.
ie.
`@NotNull @NotNull ...`
### What Java Version are you using?
openjdk 17.0.4.1 2022-08-12 OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1) OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)
### What is your operating system and platform?
Windows 10 Enterprise x64
### How did you install Java?
Using IntelliJ - installed JDK via IDE.
### Did it work before?
```shell
No. There have been problems with the TYPE_USE annotations in previous JDKs (I tested 8, 11, and 17).
```
### Did you test with other Java versions?
```shell
Yes - Temurium Builds of 8, 11, and 17.
```
### Relevant log output
_No response_
Contributor guide
Research direction
Reproduce the report with the provided TestInterface and compare Javadoc Method Summary with Method Details using the affected JDK versions. Start by investigating Javadoc's rendering of TYPE_USE annotations, then confirm whether the duplication is in the JDK or distribution and verify that each annotation appears only as declared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100