-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
6, 8-pool
-
windows_7
FULL PRODUCT VERSION :
java version " 1.6.0_38 "
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Versione 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
public static void main(String[] args) {
Pattern replace = Pattern.compile( " \\s+ " );
replace.matcher(null);
}
throw:
Exception in thread " main " java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.<init>(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at test.main(test.java:13)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should throw a specific exception?
REPRODUCIBILITY :
This bug can be reproduced always.
java version " 1.6.0_38 "
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Versione 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
public static void main(String[] args) {
Pattern replace = Pattern.compile( " \\s+ " );
replace.matcher(null);
}
throw:
Exception in thread " main " java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.<init>(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at test.main(test.java:13)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should throw a specific exception?
REPRODUCIBILITY :
This bug can be reproduced always.