Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/org/codehaus/jettison/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ public boolean optBoolean(String key, boolean defaultValue) {
try {
return doGetBoolean(key, o);
} catch (JSONException ex) {
throw new RuntimeException(ex);
return defaultValue;
}
}
}
Expand Down Expand Up @@ -740,7 +740,7 @@ public double optDouble(String key, double defaultValue) {
try {
return doGetDouble(key, o);
} catch (JSONException ex) {
throw new RuntimeException(ex);
return defaultValue;
}
}
}
Expand Down Expand Up @@ -778,7 +778,7 @@ public int optInt(String key, int defaultValue) {
try {
return doGetInt(key, o);
} catch (JSONException ex) {
throw new RuntimeException(ex);
return defaultValue;
}
}
}
Expand Down Expand Up @@ -844,7 +844,7 @@ public long optLong(String key, long defaultValue) {
try {
return doGetLong(key, o);
} catch (JSONException ex) {
throw new RuntimeException(ex);
return defaultValue;
}
}
}
Expand Down