Aias00 opened a new pull request, #972:
URL: https://github.com/apache/fesod/pull/972
## Summary
Fixes #971.
The workbook-level read holder aliased `DefaultConverterLoader`'s shared
static `allConverter` map instead of copying it, so custom converters
registered via `registerConverter(...)` were `put()` into the global map and
leaked into every later, unrelated read on the same JVM. This mirrors the write
side (`AbstractWriteHolder:271`), which already copies.
## Root cause
`AbstractReadHolder`:
```java
if (parentAbstractReadHolder == null) {
setConverterMap(DefaultConverterLoader.loadDefaultReadConverter()); //
shared static, no copy
} else {
setConverterMap(new
HashMap<>(parentAbstractReadHolder.getConverterMap()));
}
```
`loadDefaultReadConverter()` returns the static `allConverter` map by
reference, so the `getConverterMap().put(...)` loop right below mutates the
shared map and the registration survives the reader.
## Fix
```java
setConverterMap(new
HashMap<>(DefaultConverterLoader.loadDefaultReadConverter()));
```
## Verification
Added `ReadConverterIsolationTest` which:
1. reads a file with a registered marker converter → values carry the marker
(expected);
2. reads the same file with a **fresh reader and no converter** → asserts
values carry **no** marker.
Before the fix, step 2 failed (`hello [MARKER]` instead of `hello`). After
the fix it passes. Full `fesod-sheet` suite: `Tests run: 668, Failures: 0,
Errors: 0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]