-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve toString() for Profiles.of() implementation
Prior to this commit, the toString() implementation in ProfilesParser (which is the internal implementation of Profiles.of()) concatenated profile expressions with " or ". For example, the string representation of Profiles.of("spring & framework", "java | kotlin") was "spring & framework or java | kotlin". This commit improves the toString() implementation by wrapping individual profile expressions in parentheses and concatenating them with " | ". For example, the string representation from the previous example is now "(spring & framework) | (java | kotlin)". This makes it easier to read (for example, when debugging) and comprehend. As an additional benefit, the result of invoking toString() can even be used as a logically equivalent composite profile expression, though that is not the primary goal of this change. Closes gh-30374
- Loading branch information
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters