mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix put bug
This commit is contained in:
@@ -457,6 +457,9 @@ public class JSONArray implements JSON, JSONGetter<Integer>, List<Object>, Rando
|
||||
*/
|
||||
@Override
|
||||
public Object set(int index, Object element) {
|
||||
if(index > size()){
|
||||
add(index, element);
|
||||
}
|
||||
return this.rawList.set(index, JSONUtil.wrap(element, this.config));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user