Fix implementation for #466 to handle default empty string

This commit is contained in:
Tom Morris 2013-09-04 18:59:13 -04:00
parent ec12e5f004
commit cce480ff38

View File

@ -110,7 +110,8 @@ public class StandardReconConfig extends ReconConfig {
JSONObject t = obj.has("type") && !obj.isNull("type") ? obj.getJSONObject("type") : null;
int limit = obj.has("limit") ? obj.getInt("limit") : 0;
String limitString = obj.has("limit") && !obj.isNull("limit") ? obj.getString("limit") : "";
int limit = "".equals(limitString) ? 0 : Integer.parseInt(limitString);
return new StandardReconConfig(
obj.getString("service"),