| Summary: | Missing Javadoc compile problem for annotation method without @return tag | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | stephan.herrmann |
| Version: | 4.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
Frankly, I'd have no idea what useful information I should write at a @return tag for an annotation element. Are there any recommendation how to avoid boilerplate like: /** * Specifies the set of locations within the annotated declaration that should be affected by the nonnull default. * @return the set of locations within the annotated declaration that should be affected by the nonnull default. */ ?? Yeah, that's a problem for every non-void method, not only annotation methods. http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#@return also doesn't propose a good solution. I usually end up with two possible solutions: a) omit the main description and just have the @return tag b) write most of the specification in the main description and have a short @return tag that just tells what it returns and whether <code>null</code> or an empty array/collection is allowed In this case, @return could be: * @return the affected locations, or an empty array to cancel any null defaults from enclosing scopes This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
When the "Missing Javadoc tags" compiler option is enabled, then there should be a problem for the missing @return tag in this annotation method: public @interface NonNullByDefault { /** * Specifies the set of locations within the annotated declaration that should be affected by the nonnull default. * @since 2.0 */ DefaultLocation[] value() default { PARAMETER, RETURN_TYPE, FIELD, TYPE_BOUND, TYPE_ARGUMENT }; }