feat: honor wildcard custom converters when reading - #1086
Open
BigDataDZ wants to merge 1 commit into
Open
Conversation
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
BigDataDZ
force-pushed
the
fix/read-wildcard-converter
branch
from
September 10, 2026 01:04
18c5070 to
8f0ab7a
Compare
2 tasks
skytin1004
reviewed
Sep 11, 2026
skytin1004
left a comment
Contributor
There was a problem hiding this comment.
Hi @BigDataDZ,
I tried registering a STRING converter first and a wildcard converter second. Before this change, the STRING converter handled string cells. With this change, the wildcard converter handles them instead.
Is this change intentional? If not, could you keep the STRING converter handling these cells and add a test for this registration order?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the pull request
Custom converters registered with
supportExcelTypeKey() == null(the wildcard contract: "matchesevery cell data type") never applied on the read path: the built-in concrete-key converter silently
took over, or reading failed with
Converter not found. With this change, a singleregisterConverter(...)call works for reading exactly as it already does for writing.Closed: #1085
What's changed?
AbstractReadHoldernow routes custom converter registration throughregisterCustomConverter,which — when
supportExcelTypeKey()isnull— additionally registers the converter under everyconcrete
CellDataTypeEnumkey (all exceptEMPTY, which is filtered before lookup).Read lookups (
ConverterUtils#convertToJavaObject,ConverterUtils#convertToStringMap) use theconcrete cell type as key, so a wildcard registration at
(JavaType, null)never matched: e.g. awildcard
Booleanconverter reading a"yes"cell producedfalsevia the built-inBooleanStringConverter(Boolean.valueOf("yes")), with no warning. This is the read-path twin of#1045/#1056 (write/CSV flavor, addressed by PR #1069) and mirrors that PR's registration-expansion
approach, expanded to all concrete types because read lookups can arrive with any cell type.
Lookup code is untouched. Explicit-key registrations keep their priority semantics, and users
without wildcard custom converters are unaffected.
New
WildcardConverterReadTest(round-trip): the wildcard-read case fails on currentmain(
"yes"read asfalse) and passes with this change; the explicitSTRING-key case is aregression guard. Full fesod-sheet suite: 920/920 green.
Checklist