10

With Java8 the javadoc checks became stricter. The common solution is to disable the strict javadoc checking. Nevertheless, I started trying to fix the errors in some projects.
But there is one error I don't get fixed.

The corresponding class:

package foo;

import com.google.gwt.user.client.ui.TextArea;
[...]

public class MyClass {

  [...]

  /**
   * @see TextArea#getValue()
   */
  public String getValue() {
      [...]
  }

  /**
   * @see TextArea#setValue(String value)
   */
  public void setValue(String value) {
      [...]
  }

  /**
   * @see TextArea#setValue(String, boolean)
   */
  public void setValue(String value, boolean fireEvents) {
      [...]
  }
}

And the error message:

[ERROR] ...\MyClass.java:44: error: reference not found
[ERROR] * @see TextArea#setValue(String value)  
[ERROR] ^
[ERROR] ...\MyClass.java:51: error: reference not found
[ERROR] * @see TextArea#setValue(String, boolean)

The error message states that it cannot find TextArea in the Javadoc of the setValue-Methods - but on the other hand has no problems to find TextArea on the getValue-Method.

As far as I can say, I followed How to specify a name as well as @see reference.

Any clues? Thanks a lot!

markus_
  • 480
  • 3
  • 12

3 Answers3

11

Okay, I got the answer now, it's a bit tricky!

  • TextArea extends ValueBoxBase<String>
  • TextArea#getValue() has no Parameters, so everything is fine
  • The Method TextArea#setValue(String value) does not exist in TextArea, it is rather defined in the superclass: ValueBoxBase#setValue(Object, boolean).

But there it is! There is "technically" no method setValue(String). It's rather setValue(Object). There is either no way for javadoc to resolve this on its own or it's just a bug.

Thus, the only was I found to solve this is using the reference to the superclass.

/**
 * @see com.google.gwt.user.client.ui.ValueBoxBase#setValue(Object, boolean)
 */
markus_
  • 480
  • 3
  • 12
1

Instead of:

/**
 * @see TextArea#getValue()
 */

Try:

/**
 * @see com.google.gwt.user.client.ui.TextArea#getValue()
 */
Daniel
  • 21,933
  • 14
  • 72
  • 101
  • I already tried with no success `[ERROR] ..\MyClass.java:51: error: reference not found [ERROR] * @see com.google.gwt.user.client.ui.TextArea#setValue(String, boolean)` – markus_ Oct 17 '16 at 09:58
0

I had the sameproblem. But I solved without () of method.

@see ClassTest.method