redhat-developer / redhat-developer/vscode-java
Javadoc overriding methods not inheriting @param descriptions
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
EDIT: This issue was originally about the {@inheritDoc} tag, but I realized it's actually caused by something else after some more experimentation.
When method Javadocs are inherited through {@inheritDoc}, the parameter descriptions are not shown in the hover popups.
When hovering over methods that override a parent method, the descriptions for @param tags in the parent's Javadoc are not inherited, which does not match the Javadoc tool's HTML output.
Environment
- Operating System: Ubuntu 18.04/20.04
- JDK version: 11.0.3
- Visual Studio Code version: 1.36.0-insider/1.56.0-insider
- Java extension version: 0.46.0/0.77.0
Steps To Reproduce
- Open a new folder
- Create two Java files:
public class Foo {
/**
* Foo.foo
*
* @param i an int
*/
public int foo(int i) {
return i;
}
}
public class Bar extends Foo {
@Override
public int foo(int i) {
return i;
}
}
- Hover over the
foomethod name inBarto see the Javadoc.
Current Result
When hovering above Bar.foo(int), in the Javadoc popup, the description for the parameter i is empty:

Expected Result
The description for i should be the same as in Foo.foo(int), which is what the Javadoc tool does:

According to the documentation of the Javadoc tool, the missing @param tags should have been inherited from the overridden method. This does work for @return and @throws tags, but not for @param tags.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo el comportamiento del hover con los archivos Java Foo y Bar del issue y, después, compara el Javadoc del método sobrescrito con la salida HTML de la herramienta Javadoc. El issue estará terminado cuando la descripción heredada de @param para i aparezca en el popup del hover, coincidiendo con el método padre y con el comportamiento documentado de Javadoc.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, typescript
- Área
- developer-experience, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100