Throw NPE if s is null

Bug: 5926510
Change-Id: I3d0a38d31695a8b103b3d153d90d83474f56990e
This commit is contained in:
Alon Albert
2012-01-26 14:25:19 -08:00
parent 3ad774667d
commit 11afa8a466

View File

@ -481,6 +481,9 @@ public class Time {
* @throws android.util.TimeFormatException if s cannot be parsed.
*/
public boolean parse3339(String s) {
if (s == null) {
throw new NullPointerException("time string is null");
}
if (nativeParse3339(s)) {
timezone = TIMEZONE_UTC;
return true;