-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 18
-
b05
-
generic
-
generic
-
Verified
A DESCRIPTION OF THE PROBLEM :
Compiling a Regex Pattern with an unescaped trailing backslash causes an internal error:
Pattern.compile("\\")
Exception:
Exception java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
---
This report is about the fact that an internal error is reported; it is not (likeJDK-4783892) about the misunderstanding that backslashes need to be escaped.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Pattern.compile("\\")
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An exception with a message saying something similar to:
> Unescaped trailing backslash at index ...
ACTUAL -
Exception java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
Compiling a Regex Pattern with an unescaped trailing backslash causes an internal error:
Pattern.compile("\\")
Exception:
Exception java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
---
This report is about the fact that an internal error is reported; it is not (like
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Pattern.compile("\\")
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An exception with a message saying something similar to:
> Unescaped trailing backslash at index ...
ACTUAL -
Exception java.util.regex.PatternSyntaxException: Unexpected internal error near index 1