The toString()
implementation in ProfilesParser
(which is the internal implementation of Profiles.of()
) currently concatenates profile expressions with " or "
.
For example, the current string representation of Profiles.of("spring & framework", "java | kotlin")
is "spring & framework or java | kotlin"
.
Ideally, the string representation would be "(spring & framework) | (java | kotlin)"
.
This makes it easier to read (for example, when debugging) and aligns with the semantics of toStringAST()
in SpelNode
.
As an additional benefit, the result of invoking toString()
could even be used as a logically equivalent composite profile expression, though that is not the primary goal of the proposed change.