Closed bjorndarri closed 3 weeks ago
Hi,
I'm afraid that after so many years, it is a bit late to make such change. The map with the parameters values is available in report expressions and in scriptlets through the built-in variable called REPORT_PARAMETERS_MAP. Chances are some people might use this to return values calculated during report execution.
The possible damage outweighs the benefit.
Thank you, Teodor
I agree, the benefits are quite small, thanks anyway.
I'd love to be able to use
Map.of()
(or other immutable map constructs) when specifying report parameters, butBaseReportFiller
adds items to the map, which causes anUnsupportedOperationException
to be thrown in case of an immutable map.The solution.
Make a copy of the
parameterValues
map, received viaReportFiller.fill()
For example: