From cce480ff3860f27964cf33a10e0350aa9294e51a Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Wed, 4 Sep 2013 18:59:13 -0400 Subject: [PATCH] Fix implementation for #466 to handle default empty string --- .../src/com/google/refine/model/recon/StandardReconConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/com/google/refine/model/recon/StandardReconConfig.java b/main/src/com/google/refine/model/recon/StandardReconConfig.java index fe14b47bb..3a8e7d73c 100644 --- a/main/src/com/google/refine/model/recon/StandardReconConfig.java +++ b/main/src/com/google/refine/model/recon/StandardReconConfig.java @@ -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"),