Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcdaaf12

Browse files
JSONArray.remove
1 parent4d86b05 commitcdaaf12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎JSONArray.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ of this software and associated documentation files (the "Software"), to deal
7575
* </ul>
7676
*
7777
* @author JSON.org
78-
* @version2013-04-18
78+
* @version2014-04-18
7979
*/
8080
publicclassJSONArray {
8181

@@ -814,7 +814,9 @@ public JSONArray put(int index, Object value) throws JSONException {
814814
*/
815815
publicObjectremove(intindex) {
816816
Objecto =this.opt(index);
817-
this.myArrayList.remove(index);
817+
if (index >=0 &&index <this.length()) {
818+
this.myArrayList.remove(index);
819+
}
818820
returno;
819821
}
820822

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp