mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 18:55:30 +08:00
JSONArray.remove
This commit is contained in:
@@ -75,7 +75,7 @@ import java.util.Map;
|
||||
* </ul>
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2013-04-18
|
||||
* @version 2014-04-18
|
||||
*/
|
||||
public class JSONArray {
|
||||
|
||||
@@ -814,7 +814,9 @@ public class JSONArray {
|
||||
*/
|
||||
public Object remove(int index) {
|
||||
Object o = this.opt(index);
|
||||
this.myArrayList.remove(index);
|
||||
if (index >= 0 && index < this.length()) {
|
||||
this.myArrayList.remove(index);
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user