adoptium-support
adoptium-support copied to clipboard
Javadoc doubling up on TYPE_USE annotations.
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.
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
</dependency>
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?
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?
Yes - Temurium Builds of 8, 11, and 17.
Relevant log output
No response
Sorry just found this related issue in the openjdk bugs:
https://bugs.openjdk.org/browse/JDK-8278592
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. It will be closed soon unless the stale label is removed by a committer, or a new comment is made.
still an issue
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. It will be closed soon unless the stale label is removed by a committer, or a new comment is made.
still a problem. updating to prevent close by autobot
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. It will be closed soon unless the stale label is removed by a committer, or a new comment is made.