Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The URLArgumentLine's PLACEHOLDER_PATTERN doesn't match whitespace after it #32831

Open
xuanwubing opened this issue Sep 11, 2024 · 3 comments
Open

Comments

@xuanwubing
Copy link

usually, we would comment our xxx.yml config's key;
but,if we use placeholder with comment, then the placeholder value must has one whitespace after it at least.

This " private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("\$\$\{(.+::.*)}$");" regular expression doesn't support any whitespace after placeholder.

@linghengqian
Copy link
Member

  • I would say this is intentional, I'm a committer to the original SPI implementation, and it was designed to only parse YAML values, not a whole line of YAML.
  • I roughly know what implementation you're referring to, and I think you could consider submitting a new SPI implementation for the JDBC Driver. This would completely bypass URLArgumentLine.

@xuanwubing
Copy link
Author

xuanwubing commented Sep 12, 2024

I cant agree this is intentional. cause the regular expression[ $${(.+::.*)}$] is not right.
placeholder's regular expression should only match the placeholder itself, no matter what characters before or after it(ps:the regular expression can match placeholder with head characters).

Anyway, as you said I can implement another for handle this problem!!!Thanks!!!

@linghengqian
Copy link
Member

Since I don't see any PR, I'll say I don't know what regular expressions you're referring to should look like.

By the way, there have been changes to the regular expression in this part of the shardingsphere master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants