Skip to content

Javadoc says method may return null, but code does not allow it #2205

@wonwoo

Description

@wonwoo

The Javadoc of MappingRelationalConverter.getPotentiallyConvertedSimpleRead says the method may return null

/**
 * @return the converted value if a conversion applies or the original value.
 * Might return {@code null}.
 */

However, in the implementation, null is not allowed:

Object converted = getConversionService().convert(...);
Assert.state(converted != null, "Converted must not be null");

Could you clarify whether the Javadoc is outdated or the code behavior is a mistake?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions