| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: jjh75607 <jjh7560734@gmail.com>
|
Thank you for this PR! That is a valid point.
Yes please, for consistency with other serializers |
Sorry, something went wrong.
Signed-off-by: jjh75607 <jjh7560734@gmail.com>
|
Done. spring-batch-core passes, 819 tests. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
JacksonExecutionContextStringSerializer allows java.xml. in its BasicPolymorphicTypeValidator. But java.xml is a JPMS module name, not a package. The JDK package is javax.xml., so the entry matches nothing and every javax.xml.* type is denied.
The type this hits is javax.xml.namespace.QName, which Spring Batch writes to the execution context itself. With saveState enabled, StaxEventItemWriter stores the elements its header callback left open as a List<QName>, and reads them back in open().
Serialization succeeds, so the run completes normally. Only the restart fails, with InvalidTypeIdException ... denied resolution.
Both other serializers allow the class deliberately: Jackson2ExecutionContextStringSerializer since 398d52a, which fixed #4044, and DefaultExecutionContextSerializer since 46768dc.
The change is one line, java.xml. to javax.xml.. The added test round-trips a QName through the serializer. It fails on main with the exception above and passes with the change. The spring-batch-infrastructure, spring-batch-core, spring-batch-test and spring-batch-integration suites all pass.
If you would rather match the other two serializers exactly, allowIfSubType("javax.xml.namespace.QName") also works and I am happy to change it.
The same line is present in v6.0.0 and on 6.0.x, so I have left the backport judgement to you.
Related to but distinct from #4697. That issue is about the deprecated Jackson2ExecutionContextStringSerializer dropping a QName prefix. That behaviour is unchanged here and I will follow up there separately.