-
Bug
-
Resolution: Not an Issue
-
P4
-
8u60
-
b119
-
x86_64
-
linux
FULL PRODUCT VERSION :
javac -version
javac 1.8.0_31
A DESCRIPTION OF THE PROBLEM :
When the following regular expression is run:
Regular expression: (?<before>.*)\{(?<reflection>\w+):(?<innerMethod>\w+(\.?\w+(\(((?<args>(('[^']*')|((/|\w)+))(,(('[^']*')|((/|\w)+)))*))?\))?)*)\}(?<after>.*)
With processed text: {CeGlobal:getSodCutoff.getGui.getAmqp.getSimpleModeEnabled()
Actually there is bug in text (there is missing bracket at the end), but the result is matcher is frozen at all which should not happen at all.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
m.find exits with the result regular expression did not match.
ACTUAL -
Thread which runs m.find is frozen
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error because application is frozen till .find
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class TestRegexp
{
public static void main(String[] args)
{
Matcher m = Pattern.compile("(?<before>.*)\\{(?<reflection>\\w+):(?<innerMethod>\\w+(\\.?\\w+(\\(((?<args>(('[^']*')|((/|\\w)+))(,(('[^']*')|((/|\\w)+)))*))?\\))?)*)\\}(?<after>.*)").matcher("{CeGlobal:getSodCutoff.getGui.getAmqp.getSimpleModeEnabled()");
if (m.find())
System.out.println(m);
}
}
---------- END SOURCE ----------
javac -version
javac 1.8.0_31
A DESCRIPTION OF THE PROBLEM :
When the following regular expression is run:
Regular expression: (?<before>.*)\{(?<reflection>\w+):(?<innerMethod>\w+(\.?\w+(\(((?<args>(('[^']*')|((/|\w)+))(,(('[^']*')|((/|\w)+)))*))?\))?)*)\}(?<after>.*)
With processed text: {CeGlobal:getSodCutoff.getGui.getAmqp.getSimpleModeEnabled()
Actually there is bug in text (there is missing bracket at the end), but the result is matcher is frozen at all which should not happen at all.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
m.find exits with the result regular expression did not match.
ACTUAL -
Thread which runs m.find is frozen
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error because application is frozen till .find
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class TestRegexp
{
public static void main(String[] args)
{
Matcher m = Pattern.compile("(?<before>.*)\\{(?<reflection>\\w+):(?<innerMethod>\\w+(\\.?\\w+(\\(((?<args>(('[^']*')|((/|\\w)+))(,(('[^']*')|((/|\\w)+)))*))?\\))?)*)\\}(?<after>.*)").matcher("{CeGlobal:getSodCutoff.getGui.getAmqp.getSimpleModeEnabled()");
if (m.find())
System.out.println(m);
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8154101 matches method halt with some reg expressions
-
- Closed
-
- relates to
-
JDK-8139263 Matcher#find is very slow when no match is found
-
- Closed
-
-
JDK-8141066 Regular expression parsing loop
-
- Closed
-