Skip to content

FELIX-6881: Fix ClassCastException in MultiPropertyFilterIndex - #602

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

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

Conversation

@pderop

@pderop pderop commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Motivation:

MultiPropertyFilterIndex.handleServiceRemove cast the ServiceReference to ArrayList instead of the list of references. When a key was shared with other references, this threw a ClassCastException and the remaining keys were not cleaned up, leaving stale references in the index.

Modification:

Cast the list of references instead of the ServiceReference. Add FELIX6881_MultiPropertyFilterIndexRemoveTest, which removes a service having shared keys and a multi-valued objectClass.

Result:

Removing a service from the index no longer throws and all its keys are cleaned up.

…PropertyFilterIndex

Motivation:

MultiPropertyFilterIndex.handleServiceRemove cast the ServiceReference to
ArrayList instead of the list of references. When a key was shared with
other references, this threw a ClassCastException and the remaining keys
were not cleaned up, leaving stale references in the index.

Modification:

Cast the list of references instead of the ServiceReference. Add
FELIX6881_MultiPropertyFilterIndexRemoveTest, which removes a service
having shared keys and a multi-valued objectClass.

Result:

Removing a service from the index no longer throws and all its keys are
cleaned up.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pderop pderop self-assigned this 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.

2 participants