Skip to content

FELIX-6887: Copy all fields in dependency copy constructors - #607

Open
pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6887
Open

pderop wants to merge 1 commit into
apache:masterfrom
pderop:FELIX-6887

Conversation

@pderop

@pderop pderop commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Motivation:

Dependency copies are used for adapters, aspects, factory components and prototype clones. The copy constructors of ServiceDependencyImpl and ConfigurationDependencyImpl drop some fields: the swap callback is lost, and an optional configuration dependency becomes required in the copy.

Modification:

Copy the missing fields (swap callback, tracked service id, debug key, optional flag, needsInstance flag) and add a unit test checking copies.

Result:

A dependency copy behaves like the original: swap callbacks are invoked and optional configuration dependencies stay optional.

Motivation:

Dependency copies are used for adapters, aspects, factory components
and prototype clones. The copy constructors of ServiceDependencyImpl and
ConfigurationDependencyImpl drop some fields: the swap callback is lost,
and an optional configuration dependency becomes required in the copy.

Modification:

Copy the missing fields (swap callback, tracked service id, debug key,
optional flag, needsInstance flag) and add a unit test checking copies.

Result:

A dependency copy behaves like the original: swap callbacks are invoked
and optional configuration dependencies stay optional.
@pderop pderop self-assigned this Nov 27, 2026
@pderop pderop changed the title FELIX-6887: DM: copy all fields in dependency copy constructors FELIX-6887: Copy all fields in dependency copy constructors Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant