Bugfix
Detail
#28170
Layout editor: Editing view not possible after integrating `woodstox-core`
After integrating woodstox-core, an XML writer is delivered by the responsible factory method, which must be flushed/closed after use. Without a flush, the following error occurs because the moved arguments are not complete:
Caused by: java.lang.IllegalArgumentException: Given input is not well-formed XML: Premature end of file. at com.top_logic.basic.core.xml.DOMUtil.parse(DOMUtil.java:309) at com.top_logic.basic.xml.XMLPrettyPrinter.prettyPrint(XMLPrettyPrinter.java:326) at com.top_logic.layout.editor.LayoutTemplateUtils.deserializeTemplateArguments(LayoutTemplateUtils.java:360) at com.top_logic.layout.editor.LayoutTemplateUtils.getDeserializedTemplateArguments(LayoutTemplateUtils.java:349) at com.top_logic.layout.editor.LayoutTemplateUtils.getReparsedArguments(LayoutTemplateUtils.java:862) at com.top_logic.layout.editor.commands.EditComponentCommand.openEditComponentDialog(EditComponentCommand.java:91) at com.top_logic.layout.editor.commands.EditComponentCommand.openEditComponentDialog(EditComponentCommand.java:81) at com.top_logic.layout.editor.commands.EditComponentCommand.handleCommand(EditComponentCommand.java:74) at com.top_logic.tool.boundsec.CommandHandlerUtil.handleCommand(CommandHandlerUtil.java:31) at com.top_logic.mig.html.layout.LayoutComponent.dispatchCommand(LayoutComponent.java:3087) at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatchCommand(CommandDispatcher.java:196) ... 68 more
Problematic dependency:
<dependency> <groupId>com.fasterxml.woodstox</groupId> <artifactId>woodstox-core</artifactId> <version>6.5.1</version> </dependency>
Code migration
- com.top_logic.basic.config.ConfigurationWriter must now be used with try-with-resources block.
Test
No test.