Skip to content

Instantly share code, notes, and snippets.

//
// CHALLENGE (work in pairs):
// Move from f(o) -> o.f() and make sure that the code is CQS compliant.
//
// 1
// Turn on object-thinking and re-design the code accordingly
/*
class CsvParser<T extends Line> {
// CHALLENGE (work in pairs):
// Improve code snippets listed below –
//
// 1 - implement Xml class instead of XmlMarshaller
class XmlMarshaller {
byte[] marshallToXml(Invoice invoice) {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
JaxbMarshaller jaxbMarshaller = new JaxbMarshaller(Invoice.class);