Fix order-dependent deletion for superset value lists (#260) - #263
Conversation
|
Hi @Pybsama |
|
Thanks @Pybsama for your contribution. This is a careful fix, and the test design is strong.
Two changes I'd like before merge:
Optionally polish these:
When you've made the changes, please mark the PR ready for review and we can get this formally reviewed. Generative AI Assisted Review |
0e0b365 to
d8e4af7
Compare
|
Addressed the requested changes and marked the PR ready for review:
Fresh verification on JDK 21:
Current head: d8e4af7. |
Issue #, if available:
Closes #260
Description of changes:
Machine.deleteRulecould silently fail when the supplied rule contained asuperset of the stored values. Values within a field have OR semantics, but
the delete path reused a mutable candidate set across those alternatives and
also used an empty set to mean both "not initialized yet" and "no candidates
matched the preceding keys." The result depended on value order.
This change:
from preceding keys;
alternatives for the field.
The existing multi-NameState wildcard teardown guard remains unchanged.
Testing:
mvn -Dtest=MachineTest test: 91 tests passed.mvn verify: 772 tests passed; Checkstyle and SpotBugs reported no findings.Benchmark / Performance (for source code changes):
Environment:
Full comparison command:
The only full-run flag was
ANYTHING_BUT, 0.2 percentage points outside thescript's heuristic noise band. I repeated the whole
ANYTHING_BUTfamily with5 warmup and 15 measurement passes:
No matching-throughput regression was reproducible. This change only affects
rule deletion; the benchmark exercises event matching.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.