False Positive: Supplementary characters in regex are flagged as invalid

IntelliJ with the SonarLint plugin (4.14.1.27745), linting Java 1.8+

When supplementary characters (see link below) are used in regex, the rule java:S5856 flags those regex expressions as invalid.

private static final String WITH_SUPPLEMENTARY = "[^\ud800\udc00-\udbff\udfff]";

https://www.oracle.com/technical-resources/articles/javase/supplementary.html

Hi @lazybuttons,

Thank you for your feedback. It is a known issue, which is going to be fixed very soon.

Regards,
Margarita

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.