Skip to content

Convert return statement to use Optional.ofNullable(xxx)/Optional.of(xxx) in methods with Optional return type #56

@markiewb

Description

@markiewb

Provide some fixes for return statements within methods with the return type java.util.Optional.

For example

  • return null will be transformed to return Optional.empty()
  • return xxx will be transformed to return Optional.of(xxx) or return Optional.ofNullable(xxx)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions