Skip to content

Documentation Comments Style Guide - @return #19920

@gianmarcoschifone

Description

@gianmarcoschifone

Parent issue: #19807

Coverage table

Chapter link

Content

Image

Image

Text

@return (reference page)

Omit @return for methods that return void and for constructors; include it for all other methods, even if its content is entirely redundant with the method description. Having an explicit @return tag makes it easier for someone to find the return value quickly. Whenever possible, supply return values for special cases (such as specifying the value returned when an out-of-bounds argument is supplied).

Use the same capitalization and punctuation as you used in @param.

Guidelines

This chapter is covered by JavadocMethod. Proposal:

Documentation Comments Rule Checkstyle Checks Used Sample files
@return ✅JavadocMethod
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions