adoptium-support icon indicating copy to clipboard operation
adoptium-support copied to clipboard

Javadoc doubling up on TYPE_USE annotations.

Open JWT007 opened this issue 3 years ago • 6 comments

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

JWT007 avatar Sep 23 '22 07:09 JWT007

Sorry just found this related issue in the openjdk bugs:

https://bugs.openjdk.org/browse/JDK-8278592

JWT007 avatar Sep 23 '22 07:09 JWT007

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.

github-actions[bot] avatar Dec 23 '22 00:12 github-actions[bot]

still an issue

JWT007 avatar Dec 23 '22 06:12 JWT007

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.

github-actions[bot] avatar Mar 24 '23 00:03 github-actions[bot]

still a problem. updating to prevent close by autobot

jethomas-tsi avatar Mar 24 '23 01:03 jethomas-tsi

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.

github-actions[bot] avatar Jun 23 '23 00:06 github-actions[bot]