生成的 Javadoc 与 NetBeans 弹出窗口显示的不同

Generated Javadoc is different from what NetBeans popup shows

我正在使用 NetBeans 并具有以下代码:

   public interface StackADT<E> extends Collection<E> {
        boolean push(E element);
        E pop();
        E peek();
   }

   public class ArrayStack<E> implements StackADT<E> {
       //other methods

       /** Adds all the elements of a given collection to
        *  the stack.
        * @param c the collection whose elements should be
        *          added.
        * @return <br>{@code true} if the collection does not
        *         contain {@code null} elements.
        */
       @Override
       public boolean addAll(Collection<? extends E> c) {
           //do stuff
       }
   }

当我为项目生成 Javadoc 时,它正确显示 this. However, the documentation popup shows this。出于某种原因,return 标记显示来自 Collections' 文档的文本应该被覆盖,但仅在弹出窗口中。我试过重新启动 NetBeans 并重写该方法的 Javadoc,但没有任何效果。有什么想法吗?

这是一个错误。我为此创建了一个 issue and PR。我认为它会在 12.1 中修复。

您可以轻松查看。如果您像这样更改 JavaDoc(将 return 标记移至顶部):

   /** Adds all the elements of a given collection to
    *  the stack.
    * @return <br>{@code true} if the collection does not
    *         contain {@code null} elements.
    *
    * @param c the collection whose elements should be
    *          added.
    */

那么 param 标签的描述将被复制而不是 return 标签: