xstream.registerConverter(new HibernatePersistentSortedSetConverter(xstream.getMapper()));
xstream.registerConverter(new LocalDateConverter());
xstream.registerConverter(new LocalDateTimeConverter());
return xstream;
}
<BUG>public static void exportAccountTree(final Engine engine, final File file) {
</BUG>
RootAccount account = engine.getRootAccount();
XStream xstream = getStream();
<BUG>try (final OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), ENCODING);
final ObjectOutputStream out = xstream.createObjectOutputStream(new PrettyPrintWriter(writer))) {</BUG>
out.writeObject(account);

xstream.registerConverter(new HibernatePersistentSortedSetConverter(xstream.getMapper()));
xstream.registerConverter(new LocalDateConverter());
xstream.registerConverter(new LocalDateTimeConverter());
return xstream;
}
public static void exportAccountTree(final Engine engine, final Path file) {
RootAccount account = engine.getRootAccount();
XStream xstream = getStream();
try (final Writer writer = Files.newBufferedWriter(file, ENCODING);
final ObjectOutputStream out = xstream.createObjectOutputStream(new PrettyPrintWriter(writer))) {
out.writeObject(account);
