Google's common expression language supports bytes literal, which I think is a good function. I hope spring expression can also expand this capability
b"\\x61\\x62\\x63"
will be resolved to abc
b"abc\\x61\\x62\\x63"
will be resolved to abcabc
b"\\x61\\x62\\x63" + b"\\x64\\x65\\x66"
will be resolved to abcdef
prefix:b'
or b"
suffix: '
or "
Reference: https://github.com/google/cel-spec/blob/master/doc/langdef.md#string-and-bytes-values
Comment From: bclozel
@BrucessKING please use this PR for further commits. You can force push on the same branch to update this PR.
Closing and opening multiple PRs creates lots of notifications. Thanks!
Comment From: BrucessKING
@bclozel OK, sir. This is my first contribution to the open source project. I'm sorry to disturb you. I was confused that the PR I submitted always failed to CI build. I'm looking at the reason.
Sorry to disturb you again
Comment From: bclozel
No worries! We love contributions!
If the build passes locally with ./gradlew check
then it might be an issue on our CI or something more subtle. As long as checks are ok locally for you we the team can have a look when processing your PR.
Thanks!
Comment From: BrucessKING
Thank you, sir. Your words have greatly encouraged my self-confidence.
Comment From: BrucessKING
I see a lot of duplication between
lexQuotedBytesLiteral
andlexDoubleQuotedBytesLiteral
. Couldn't those be combined into one method parameterized by the type of quote?The change needs to be reflected in the referenced docs.
I've fixed the code and updated the reference links.
Comment From: rstoyanchev
Scheduling tentatively for 6.0 M1.
@aclement if you don't mind a quick look in case you see any potential issues with this?
Comment From: sbrannen
Team Decision:
We do not foresee that such a feature would be beneficial in typical SpEL use cases.
In general, at this point in time we do not intend to introduce new language-level features in the Spring Expression Language.
In light of that, we are closing this issue.
In any case, thank you for the proposal and the PR!