Skip to content

Commit

Permalink
revised JsonArray.set() method to return the JsonElement. (thanks Buc…
Browse files Browse the repository at this point in the history
…hholz Bastian for catching that!)
  • Loading branch information
inder123 committed Jul 4, 2014
1 parent b9578a4 commit 80bbf4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gson/src/main/java/com/google/gson/JsonArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ public void addAll(JsonArray array) {
* Element can be null.
* @param index index of the element to replace
* @param element element to be stored at the specified position
* @return
* @return the element previously at the specified position
* @throws IndexOutOfBoundsException if the specified index is outside the array bounds
*/
public void set(int index, JsonElement element) {
elements.set(index, element);
public JsonElement set(int index, JsonElement element) {
return elements.set(index, element);
}

/**
Expand Down

0 comments on commit 80bbf4a

Please sign in to comment.