Commit c016d8f
committed
AXIS2-5862 Document misleading currentPhaseIndex / currentHandlerIndex naming
The two index fields on MessageContext are named opposite to what the
names imply, and that confusion is what led the AXIS2-5862 reporter
to propose a patch that would have regressed the engine:
* currentHandlerIndex indexes the MessageContext.executionChain, whose
elements are Phase objects (Phase implements Handler). So it is
effectively "index of the current Phase within the execution chain."
AxisEngine.invoke walks the chain via get/setCurrentHandlerIndex.
* currentPhaseIndex indexes the handlers list INSIDE the Phase that is
currently executing. So it is effectively "index of the current
Handler within the current Phase." Phase.invoke and
Phase.flowComplete walk that list via get/setCurrentPhaseIndex.
Renaming the fields would be a semver-major break (public getters/
setters, Externalizable wire format, downstream module code, etc.),
so the fields keep their historical names. This commit adds the
explanation directly to the fields' Javadoc, the four accessor
methods' Javadoc, and the confusing local-variable reassignment in
Phase.flowComplete where we read getCurrentPhaseIndex() into a local
called currentHandlerIndex.
No functional change.1 parent c605835 commit c016d8f
2 files changed
Lines changed: 50 additions & 3 deletions
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
350 | 358 | | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
354 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
355 | 372 | | |
356 | 373 | | |
357 | 374 | | |
| |||
625 | 642 | | |
626 | 643 | | |
627 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
628 | 650 | | |
629 | 651 | | |
630 | 652 | | |
631 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
632 | 660 | | |
633 | 661 | | |
634 | 662 | | |
| |||
1272 | 1300 | | |
1273 | 1301 | | |
1274 | 1302 | | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1275 | 1308 | | |
1276 | 1309 | | |
1277 | 1310 | | |
1278 | 1311 | | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1279 | 1318 | | |
1280 | 1319 | | |
1281 | 1320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
346 | 354 | | |
347 | 355 | | |
348 | 356 | | |
| |||
0 commit comments