Skip to content

Commit

Permalink
Compilation broken since SystemOutStreamWriter has been removed from …
Browse files Browse the repository at this point in the history
…core
  • Loading branch information
geofjamg committed Jan 3, 2017
1 parent 5533c21 commit cdae454
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -7,10 +7,12 @@
*/
package eu.itesla_project.online.tools;

import eu.itesla_project.commons.io.SystemOutStreamWriter;
import eu.itesla_project.commons.io.ForwardingOutputStream;
import eu.itesla_project.commons.io.table.*;

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
Expand Down Expand Up @@ -60,7 +62,11 @@ public static TableFormatter createFormatter(TableFormatterConfig config, String
if (outputFilePath != null) {
writer = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
} else {
writer = new SystemOutStreamWriter();
writer = new OutputStreamWriter(new ForwardingOutputStream<PrintStream>(System.out) {
@Override
public void close() throws IOException {
}
});
}
return formatterFactory.create(writer, tableTitle, config, columns);
}
Expand Down

0 comments on commit cdae454

Please sign in to comment.