This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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> { |