Source:
protected AbstractXStreamSerializer(Charset charset, XStream xStream, RevisionResolver revisionResolver, Converter converter) { Assert.notNull(charset, () -> "charset may not be null"); Assert.notNull(xStream, () -> "xStream may not be null"); Assert.notNull(converter, () -> "converter may not be null"); Assert.notNull(revisionResolver, () -> "revisionResolver may not be null"); this.charset = charset; this.xStream = xStream; this.converter = converter; this.revisionResolver = revisionResolver; if (converter instanceof ChainingConverter) { registerConverters((ChainingConverter) converter); } xStream.addImmutableType(UUID.class, true); xStream.alias("domain-event", GenericDomainEventMessage.class); xStream.alias("event", GenericEventMessage.class); xStream.alias("command", GenericCommandMessage.class); xStream.addDefaultImplementation(AssociationValuesImpl.class, AssociationValues.class); xStream.aliasField("associations", AnnotatedSaga.class, "associationValues"); xStream.alias("association", AssociationValue.class); xStream.aliasField("key", AssociationValue.class, "propertyKey"); xStream.aliasField("value", AssociationValue.class, "propertyValue"); xStream.alias("uuid", UUID.class); xStream.alias("meta-data", MetaData.class); xStream.registerConverter(new MetaDataConverter(xStream.getMapper())); if (CompositeClassLoader.class.isAssignableFrom(xStream.getClassLoader().getClass())) { ((CompositeClassLoader)xStream.getClassLoader()).add(this.getClass().getClassLoader()); } else { final CompositeClassLoader compositeClassLoader = new CompositeClassLoader(); compositeClassLoader.add(this.getClass().getClassLoader()); xStream.setClassLoader(compositeClassLoader); } }

Target:
protected AbstractXStreamSerializer(Charset charset, XStream xStream, RevisionResolver revisionResolver, Converter converter) { Assert.notNull(charset, () -> "charset may not be null"); Assert.notNull(xStream, () -> "xStream may not be null"); Assert.notNull(converter, () -> "converter may not be null"); Assert.notNull(revisionResolver, () -> "revisionResolver may not be null"); this.charset = charset; this.xStream = xStream; this.converter = converter; this.revisionResolver = revisionResolver; if (converter instanceof ChainingConverter) { registerConverters((ChainingConverter) converter); } xStream.addImmutableType(UUID.class, true); xStream.alias("domain-event", GenericDomainEventMessage.class); xStream.alias("event", GenericEventMessage.class); xStream.alias("command", GenericCommandMessage.class); xStream.addDefaultImplementation(AssociationValuesImpl.class, AssociationValues.class); xStream.aliasField("associations", AnnotatedSaga.class, "associationValues"); xStream.alias("association", AssociationValue.class); xStream.aliasField("key", AssociationValue.class, "propertyKey"); xStream.aliasField("value", AssociationValue.class, "propertyValue"); xStream.alias("uuid", UUID.class); xStream.alias("meta-data", MetaData.class); xStream.registerConverter(new MetaDataConverter(xStream.getMapper())); if (CompositeClassLoader.class.isAssignableFrom(xStream.getClassLoader().getClass())) { ((CompositeClassLoader)xStream.getClassLoader()).add(this.getClass().getClassLoader()); } else { final CompositeClassLoader compositeClassLoader = new CompositeClassLoader(); compositeClassLoader.add(this.getClass().getClassLoader()); compositeClassLoader.add(xStream.getClassLoader()); xStream.setClassLoader(compositeClassLoader); } }