| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/utilities/general/JsonUtilities.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/utilities/general/JsonUtilities.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/utilities/general/JsonUtilities.java
|
| index 46cc7d0936fad0d688d3c0dbb1dcded1f2804b6a..20b8824dcd69bd55889126069a0901328e0a940f 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/utilities/general/JsonUtilities.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/utilities/general/JsonUtilities.java
|
| @@ -43,6 +43,20 @@ public class JsonUtilities {
|
| return booleanArray;
|
| }
|
|
|
| + public static int[] decodeIntArray(JsonArray jsonArray) {
|
| + if (jsonArray == null) {
|
| + return new int[0];
|
| + }
|
| + int i = 0;
|
| + int[] intArray = new int[jsonArray.size()];
|
| + Iterator<JsonElement> iterator = jsonArray.iterator();
|
| + while (iterator.hasNext()) {
|
| + intArray[i] = iterator.next().getAsInt();
|
| + i++;
|
| + }
|
| + return intArray;
|
| + }
|
| +
|
| public static Integer[] decodeIntegerArray(JsonArray jsonArray) {
|
| if (jsonArray == null) {
|
| return new Integer[0];
|
|
|