Skip to content

Commit 11afa8a

Browse files
committed
Throw NPE if s is null
Bug: 5926510 Change-Id: I3d0a38d31695a8b103b3d153d90d83474f56990e
1 parent 3ad7746 commit 11afa8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/java/android/text/format/Time.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ public boolean parse(String s) {
481481
* @throws android.util.TimeFormatException if s cannot be parsed.
482482
*/
483483
public boolean parse3339(String s) {
484+
if (s == null) {
485+
throw new NullPointerException("time string is null");
486+
}
484487
if (nativeParse3339(s)) {
485488
timezone = TIMEZONE_UTC;
486489
return true;

0 commit comments

Comments
 (0)