Skip to content

Commit 815af1f

Browse files
alonalbertAndroid (Google) Code Review
authored andcommitted
Merge "Throw NPE if s is null"
2 parents 4bc8bfa + 11afa8a commit 815af1f

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)