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!
Okay, I got the answer now, it's a bit tricky!
TextArea
extends ValueBoxBase<String>
TextArea#getValue()
has no Parameters, so everything is fineTextArea#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)
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With