Skip to content

PagedModel.getMetadata method should not be annotated with @Nullable #3313

Closed
@hashpyrit

Description

@hashpyrit

In the class org.springframework.data.web.PagedModel the getMetadata method is annotated with @nullable.

Based on how the code is written, with page being mandatory as part of the constructor, the getMetadata method should always return an object, never null.

This is causing issues with typescript generation where it's saying that the metadata is optional, when it's really not. It will always be present based on how the code is written.

Additionally, it seems odd to have a page without mandatory paging information.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions