eeverman / eeverman/andhow

Property 'Out' aliases order is not preserved

Open
#581 0 comments 0 reactions 0 assignees View on GitHub
bug Exports
Dominant language
Java
Stars
25
Forks
34
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
With the addition of manual exports, its reasonable to expect that out aliases order would be preserved so that aliases can be distinguished by first/last, etc. It would be nice to have this as an annotation option of exports in general, e.g. `EXPORT_OUT_ALIASES.FIRST`.

The issue is shown in the `PropertyBaseTest` - there is a test message, "TODO: Out aliases should preserve order"

I think the issue is that aliases are coalesced, so matching alias names for 'in' and 'out' are combined into a single alias and then the order is unclear.

**To Reproduce**
See the test.

**Expected behavior / Actual behavior**
The order in which Out aliases and 'InAndOut' aliases is preserved for Out aliases. So:
`StrProp.builder().aliasIn("Two").aliasOut("One").aliasOut("Two")`
should have out aliases as **One, Two** (I think they would currently be Two, One due to coalescence).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.