diff options
| author | 2012-01-26 14:25:19 -0800 | |
|---|---|---|
| committer | 2012-01-26 14:25:19 -0800 | |
| commit | 11afa8a466be7fd0bb486b36612d656a09f88f46 (patch) | |
| tree | ea54fa51b81150574f9f136876f717a78648efaf | |
| parent | 3ad774667d33524d2d6d1472ded15f2c6d6f541d (diff) | |
Throw NPE if s is null
Bug: 5926510
Change-Id: I3d0a38d31695a8b103b3d153d90d83474f56990e
| -rw-r--r-- | core/java/android/text/format/Time.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/text/format/Time.java b/core/java/android/text/format/Time.java index b4445ca1e0ed..e9b0d325d257 100644 --- a/core/java/android/text/format/Time.java +++ b/core/java/android/text/format/Time.java @@ -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; |