Github user gauravgopi123 commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/91#discussion_r44212010
--- Diff:
library/src/main/java/com/datatorrent/lib/appdata/schemas/SchemaUtils.java ---
@@ -490,5 +493,54 @@ public static JSONObject createJSONObject(Map<String,
String> map)
return jo;
}
+ /**
+ * This is a helper method which converts the given {@link JSONArray} to
a {@link List} of Strings.
+ *
+ * @param jsonStringArray The {@link JSONArray} to convert.
+ * @return The converted {@link List} of Strings.
+ */
+ public static List<String> getStringsFromJSONArray(JSONArray
jsonStringArray) throws JSONException
+ {
+ List<String> stringArray = Lists.newArrayList();
--- End diff --
Can Lists.newArrayListWithCapacity() not be used since the the length of
List is known?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---