bytemechanics/standalone-ignite

ShellConsole when no default console is provided adds an additional newline

Closed this issue · 0 comments

Should change class .org.bytemechanics.standalone.ignite.shell.ShellConsole.java because is assigning println() function when in the log messages already adds the newline.

See: https://github.com/bytemechanics/standalone-ignite/blob/master/src/main/java/org/bytemechanics/standalone/ignite/shell/ShellConsole.java

	public ShellConsole(final java.io.Console _console,final BiFunction<String,Object[],String> _formatter,final boolean _verboseEnabled){
		if(_console!=null){
			this.writer=_console::printf;
			this.inputReader=null;
			this.reader=_console::readLine;
		}else{
-			this.writer=System.out::println;
+			this.writer=System.out::print;
			this.inputReader=new BufferedReader(new InputStreamReader(System.in));
			this.reader=LambdaUnchecker.uncheckedSupplier(this.inputReader::readLine);
		}
		this.formatter=_formatter;
		this.verboseEnabled=_verboseEnabled;
		this.verbose=(message) -> write(message+"\n");
		this.info=(message) -> write(message+"\n");
		this.error=(message) -> write(message+"\n");
	}