diff --git a/core/src/main/java/org/mapfish/print/processor/jasper/TableProcessor.java b/core/src/main/java/org/mapfish/print/processor/jasper/TableProcessor.java index 781cffdd51..0b5748a7c3 100644 --- a/core/src/main/java/org/mapfish/print/processor/jasper/TableProcessor.java +++ b/core/src/main/java/org/mapfish/print/processor/jasper/TableProcessor.java @@ -298,7 +298,7 @@ public Output execute(final Input values, final ExecutionContext context) throws // check if there are columns with mixed int and bigdecimal values HashSet toCorrect = new HashSet<>(); for (Map.Entry> entry : columns.entrySet()) { - if (entry.getValue().equals(Integer.class)) { + if (entry.getValue() != null && entry.getValue().equals(Integer.class)) { for (Map row : table) { if (row.get(entry.getKey()) instanceof BigDecimal) { toCorrect.add(entry.getKey()); diff --git a/examples/src/test/resources/examples/datasource_dynamic_tables/expected_output/requestData-portrait.png b/examples/src/test/resources/examples/datasource_dynamic_tables/expected_output/requestData-portrait.png index f21e9939ee..99033eebd8 100644 Binary files a/examples/src/test/resources/examples/datasource_dynamic_tables/expected_output/requestData-portrait.png and b/examples/src/test/resources/examples/datasource_dynamic_tables/expected_output/requestData-portrait.png differ diff --git a/examples/src/test/resources/examples/datasource_dynamic_tables/requestData-portrait.json b/examples/src/test/resources/examples/datasource_dynamic_tables/requestData-portrait.json index 85260c718c..3c22429eee 100644 --- a/examples/src/test/resources/examples/datasource_dynamic_tables/requestData-portrait.json +++ b/examples/src/test/resources/examples/datasource_dynamic_tables/requestData-portrait.json @@ -32,6 +32,16 @@ ["347352116", "Mirabeau"] ] } + }, + { + "title": "Table with int, float and null values", + "table": { + "columns": ["int", "float", "null"], + "data": [ + [337907707, 337907707.5, null], + [337907710, 337907710.4, null] + ] + } } ] }