Remove spurious JSONException in TemplatingExporter

This commit is contained in:
Antonin Delpeuch 2018-11-20 16:53:39 +00:00
parent c0d1a39991
commit 0a6b28eb2b

View File

@ -37,8 +37,6 @@ import java.io.IOException;
import java.io.Writer; import java.io.Writer;
import java.util.Properties; import java.util.Properties;
import org.json.JSONException;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.refine.browsing.Engine; import com.google.refine.browsing.Engine;
import com.google.refine.browsing.Engine.Mode; import com.google.refine.browsing.Engine.Mode;
@ -117,7 +115,6 @@ public class TemplatingExporter implements WriterExporter {
RowVisitor visitor = template.getRowVisitor(writer, limit); RowVisitor visitor = template.getRowVisitor(writer, limit);
if (sortingJson != null) { if (sortingJson != null) {
try {
SortingConfig sorting = SortingConfig.reconstruct(sortingJson); SortingConfig sorting = SortingConfig.reconstruct(sortingJson);
SortingRowVisitor srv = new SortingRowVisitor(visitor); SortingRowVisitor srv = new SortingRowVisitor(visitor);
srv.initializeFromConfig(project, sorting); srv.initializeFromConfig(project, sorting);
@ -125,9 +122,6 @@ public class TemplatingExporter implements WriterExporter {
if (srv.hasCriteria()) { if (srv.hasCriteria()) {
visitor = srv; visitor = srv;
} }
} catch (JSONException e) {
e.printStackTrace();
}
} }
filteredRows.accept(project, visitor); filteredRows.accept(project, visitor);
@ -136,7 +130,6 @@ public class TemplatingExporter implements WriterExporter {
RecordVisitor visitor = template.getRecordVisitor(writer, limit); RecordVisitor visitor = template.getRecordVisitor(writer, limit);
if (sortingJson != null) { if (sortingJson != null) {
try {
SortingConfig sorting = SortingConfig.reconstruct(sortingJson); SortingConfig sorting = SortingConfig.reconstruct(sortingJson);
SortingRecordVisitor srv = new SortingRecordVisitor(visitor); SortingRecordVisitor srv = new SortingRecordVisitor(visitor);
srv.initializeFromConfig(project, sorting); srv.initializeFromConfig(project, sorting);
@ -144,9 +137,6 @@ public class TemplatingExporter implements WriterExporter {
if (srv.hasCriteria()) { if (srv.hasCriteria()) {
visitor = srv; visitor = srv;
} }
} catch (JSONException e) {
e.printStackTrace();
}
} }
filteredRecords.accept(project, visitor); filteredRecords.accept(project, visitor);