Merge "Throw NPE if s is null"

This commit is contained in:
Alon Albert
2012-01-26 17:05:58 -08:00
committed by Android (Google) Code Review

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;