Improve toString()
for Profiles.of()
implementation
#30374
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
The
toString()
implementation inProfilesParser
(which is the internal implementation ofProfiles.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()
inSpelNode
.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.The text was updated successfully, but these errors were encountered: