Pull mkaHeaderString out so less calculations of it
#CTCTOWALTZ-2560
@@ -93,6 +93,8 @@ public class DynamicJSONFormatter implements DynamicFormatter {
List<ReportGridDerivedColumnDefinition> derivedColumnDefinitions,
List<Tuple2<ReportSubject, ArrayList<Object>>> reportRows) {
+ List<String> columnHeadings = formatterUtils.mkColumnHeaders(fixedColumnDefinitions, derivedColumnDefinitions);
+
List<Row> data = new ArrayList<>(reportRows.size());
for (Tuple2<ReportSubject, ArrayList<Object>> currentRow : reportRows) {
@@ -102,8 +104,6 @@ public class DynamicJSONFormatter implements DynamicFormatter {
transformedRow.id(createKeyElement(currentRow.v1));
- List<String> columnHeadings = formatterUtils.mkColumnHeaders(fixedColumnDefinitions, derivedColumnDefinitions);
-
int maxColumns = columnHeadings.size();
for (int idx = 0; idx < maxColumns; idx++) {
