apache / apache/netbeans

[NETBEANS‑5838] Support for `{@return …}` Javadoc tag (JDK‑8075778)

Open
#3,774 4 comments 1 reaction 0 assignees View on GitHub
Java JavaDoc kind:feature
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

From [NETBEANS‑5838]:

1) Currently
```java
/**
* {@return something}
*/
```
does not show up in the Javadoc window. According to [JDK-8075778][JDK‑8075778] the text in the tag should be displayed in the description (prefixed with "Returns " and in the "returns" section.

2) Also autoformatting the source code currently transforms the tag into
```java
/**
* {
*
* @return something}
*/
```
which is not recognized by the Javadoc generator anymore. The generated output contains "\{" as the description and the given text including "}" (but without the "{") in the "returns" section.

[NETBEANS‑5838]: https://issues.apache.org/jira/browse/NETBEANS-5838
[JDK‑8075778]: https://bugs.openjdk.java.net/browse/JDK-8075778
[JDK‑8256804]: https://bugs.openjdk.org/browse/JDK-8256804

### Use case/motivation

_No response_

### Related issues

- [NETBEANS‑5838]
- [JDK‑8075778]
- [JDK‑8256804] (**CSR**)

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow the Apache Software Foundation's [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)

Contributor guide

Open the contributing guide

Research direction

Reproduce the examples in the issue in the Javadoc window and with source autoformatting, then trace the Java editor's Javadoc parsing and formatting entry points. Done means {@return …} text appears in the description and returns section, while formatting preserves a valid tag that the Javadoc generator recognizes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
developer-experience, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.