Skip to content

Commit 440c672

Browse files
committed
manually apply patch from stleary@5a4fb65#diff-0
1 parent 982d585 commit 440c672

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

JSONArray.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ of this software and associated documentation files (the "Software"), to deal
7878
* </ul>
7979
8080
* @author JSON.org
81-
* @version 2011-05-04
81+
* @version 2011-08-25
8282
*/
8383
public class JSONArray {
8484

@@ -554,7 +554,7 @@ public String optString(int index) {
554554
*/
555555
public String optString(int index, String defaultValue) {
556556
Object object = opt(index);
557-
return object != null ? object.toString() : defaultValue;
557+
return JSONObject.NULL.equals(object) ? object.toString() : defaultValue;
558558
}
559559

560560

0 commit comments

Comments
 (0)