Source:
<code>public MarshallingResponse<Graph> unmarshallWithValidation(MarshallingRequest<InputStream, Metadata> request) { final Metadata metadata = request.getMetadata(); final InputStream inputStream = request.getInput(); LOG.debug("Starting diagram unmarshalling..."); DefinitionResolver definitionResolver; try { final DefinitionsHandler definitionsHandler = parseDefinitions(inputStream); definitionResolver = new DefinitionResolver(definitionsHandler.getDefinitions(), workItemDefinitionService.execute(metadata), definitionsHandler.isJbpm(), request.getMode()); metadata.setCanvasRootUUID(definitionResolver.getDefinitions().getId()); metadata.setTitle(definitionResolver.getProcess().getName()); BaseConverterFactory converterFactory = createToStunnerConverterFactory(definitionResolver, typedFactoryManager); Result<BpmnNode> result = converterFactory.rootProcessConverter().convertProcess(); BpmnNode diagramRoot = result.value().get(); LOG.debug("Diagram unmarshalling completed successfully."); Diagram<Graph<DefinitionSet, Node>, Metadata> diagram = typedFactoryManager.newDiagram( definitionResolver.getDefinitions().getId(), getDefinitionSetClass(), metadata); Graph<DefinitionSet, Node> graph = diagram.getGraph(); GraphBuilder graphBuilder = new GraphBuilder( graph, definitionManager, typedFactoryManager, ruleManager, commandFactory, commandManager); graphBuilder.render(diagramRoot); LOG.debug("Diagram drawing completed successfully."); <START> LOG.warn("Marshalling Messages " + result.messages() <END> .stream() .filter(Objects::nonNull) .map(MarshallingMessage::getMessage) .filter(Objects::nonNull).map(String::valueOf) .collect(Collectors.joining("\n"))); return MarshallingResponse.builder() .state(MarshallingResponse.State.SUCCESS) .messages(result.messages()) .result(graph) .build(); } catch (Exception e) { LOG.error("Marshalling error.", e); return MarshallingResponse.builder() .state(MarshallingResponse.State.ERROR) .addMessage(MarshallingMessage.builder().message(e.getMessage()).build()) .build(); } }</code><technical_language>warning message "Marshalling Messages:" is printed here. I alert users in cases mashalling api produce message all, of cases. message printed messages</technical_language>

Target:
public MarshallingResponse<Graph> unmarshallWithValidation(MarshallingRequest<InputStream, Metadata> request) { final Metadata metadata = request.getMetadata(); final InputStream inputStream = request.getInput(); LOG.debug("Starting diagram unmarshalling..."); DefinitionResolver definitionResolver; try { final DefinitionsHandler definitionsHandler = parseDefinitions(inputStream); definitionResolver = new DefinitionResolver(definitionsHandler.getDefinitions(), workItemDefinitionService.execute(metadata), definitionsHandler.isJbpm(), request.getMode()); metadata.setCanvasRootUUID(definitionResolver.getDefinitions().getId()); metadata.setTitle(definitionResolver.getProcess().getName()); BaseConverterFactory converterFactory = createToStunnerConverterFactory(definitionResolver, typedFactoryManager); Result<BpmnNode> result = converterFactory.rootProcessConverter().convertProcess(); BpmnNode diagramRoot = result.value(); LOG.debug("Diagram unmarshalling completed successfully."); Diagram<Graph<DefinitionSet, Node>, Metadata> diagram = typedFactoryManager.newDiagram( definitionResolver.getDefinitions().getId(), getDefinitionSetClass(), metadata); Graph<DefinitionSet, Node> graph = diagram.getGraph(); GraphBuilder graphBuilder = new GraphBuilder( graph, definitionManager, typedFactoryManager, ruleManager, commandFactory, commandManager); graphBuilder.render(diagramRoot); LOG.debug("Diagram drawing completed successfully for:" + request); return MarshallingResponse.builder() .state(MarshallingResponse.State.SUCCESS) .messages(result.messages()) .result(graph) .build(); } catch (Exception e) { LOG.error("Marshalling error.", e); return MarshallingResponse.builder() .state(MarshallingResponse.State.ERROR) .addMessage(MarshallingMessage.builder().message(e.getMessage()).build()) .build(); } finally { try { inputStream.close(); } catch (IOException e) { throw new RuntimeException("Error closing inputStream for: " + request, e); } } }