[
https://issues.apache.org/jira/browse/AXIS2C-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1294.
-------------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
When a handler uses 'before' or 'after' positioning rules, the phase
insertion code was using axutil_array_list_add_at() directly, which
bypassed the duplicate checking in axis2_phase_add_unique(). This caused
the same handler to be inserted multiple times into a phase.
Fix: Added axis2_phase_add_unique_at() helper function that performs
duplicate checking before positional insertion. Updated all insertion
paths in axis2_phase_insert_before(), axis2_phase_insert_after(), and
axis2_phase_insert_before_and_after() to use this new function.
Added comprehensive unit tests covering:
- Basic duplicate prevention
- Duplicate prevention with 'after' rule (original bug scenario)
- Duplicate prevention with 'before' rule
- Duplicate prevention with both 'before' and 'after' rules
- Duplicate prevention by handler name
> Same handler inserted in two places
> -----------------------------------
>
> Key: AXIS2C-1294
> URL: https://issues.apache.org/jira/browse/AXIS2C-1294
> Project: Axis2-C
> Issue Type: Bug
> Components: core/phaseresolver
> Environment: Windows XP
> Reporter: Supun Kamburugamuva
> Priority: Major
> Fix For: 2.0.0
>
>
> <handler name="DiscoveryDuplicateInHandler" class="discovery">
> <order phase="Transport" after="addressing_based_dispatcher"/>
> <parameter name="algo">DiscoveryDuplicateAlgoCount</parameter>
> <parameter name="count">1000</parameter>
> <parameter name="time">10</parameter>
> </handler>
> When I used the above configuration for inserting a handler it was inserted
> at two places in the Transport phase.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]