Skip to content

WW-5732 fix(jasperreports7): match the report format case-insensitively - #1922

Merged
lukaszlenart merged 1 commit into
mainfrom
WW-5732-format-case
Sep 12, 2026
Merged

WW-5732 fix(jasperreports7): match the report format case-insensitively#1922
lukaszlenart merged 1 commit into
mainfrom
WW-5732-format-case

Conversation

@lukaszlenart

Copy link
Copy Markdown
Member

Fixes WW-5732

The exporter providers are registered under the lower-case names from JasperReport7Constants and the container lookup is exact, so the upper-case CSV in the class Javadoc example — and in any config migrated from the 6.x plugin, whose constants are upper-case — failed with No exporter found for format: CSV.

JasperReport7Result now looks the provider up by the configured name first and, when nothing is registered under it, by its lower-cased form (Locale.ROOT). csv, Csv and CSV all select the bundled provider, while a custom provider registered under a mixed-case bean name keeps precedence. The Content-Disposition filename keeps the configured spelling, as before. Javadoc example switched to csv and the format bullet notes the case-insensitive match.

Test testFormatLookupIsCaseInsensitive (setFormat("CSV")) failed with the exception above before the change.

🤖 Generated with Claude Code

@lukaszlenart
lukaszlenart marked this pull request as ready for review September 12, 2026 10:08
The exporter providers are registered under the lower-case names in
JasperReport7Constants and the container lookup is exact, so the
upper-case "CSV" from the class Javadoc example (and from any config
migrated from the 6.x plugin, whose constants are upper-case) failed
with "No exporter found for format: CSV".

The result now retries the lookup with the lower-cased name, so a
custom provider registered under a mixed-case name keeps working while
csv, Csv and CSV all resolve to the bundled one. The example uses the
canonical lower-case spelling.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@lukaszlenart
lukaszlenart merged commit a2ed3bc into main Sep 12, 2026
12 of 13 checks passed
@lukaszlenart
lukaszlenart deleted the WW-5732-format-case branch September 12, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant