The analyzer has detected a strange regular expression, the use of which leads to a result different from what the programmer expects.
Consider the following example:
String[] arr = "Hot. Cool. Yours".split(".");
After executing this line, the array will be lacking the expected elements {"Hot", " Cool", " Yours"}. Instead, it will be an empty array. This has to do with the fact that the dot is a special character in a regular expression and has its own purpose. To make a dot a separator in your string, use it as follows:
String[] arr = "Hot. Cool. Yours".split("\\.");
The analyzer will also warn you if your regular expression consists only of these characters:
This diagnostic is classified as:
You can look at examples of errors detected by the V6059 diagnostic. |
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders:
Take
a chance!