Skip to content

Rename OverrideMetadata for Bean Overrides #33702

Closed
@sbrannen

Description

Within the org.springframework.test.context.bean.override package, OverrideMetadata sticks out like a sore thumb: it's the only public type whose name does not start with BeanOverride. Considering that alone, I'd suggest we rename it to BeanOverrideMetadata.

However, an OverrideMetadata component plays two roles: a factory for a bean override instance and a holder for metadata, and I would argue that "creation of the bean override instance" is the primary role of such a component. In addition, I find it a bit unusual that a "metadata" component "creates" something. Rather, it's usually the other way around: a component typically creates something from metadata. Along those lines, I consider an OverrideMetadata component more like a factory which creates a bean override instance based on metadata that is has been supplied.

In light of the above, I suggest that we rename OverrideMetadata to BeanOverrideFactory.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions