Description
When a call to LineAppender.flush() is interleaved between two calls to LineAppender.append(String) and the String argument of the second line begins by a tabulation, an IndexOutOfBoundsException occurs. Example of sequence of method calls:
LineAppender f = ...; f.append("S1"); f.flush(); f.append("\tS2");
This cause MonolineFormatter to fail to log some events. The symptom is the following stack trace:
java.lang.StringIndexOutOfBoundsException: String index out of range: 8 at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:203) at java.lang.StringBuilder.charAt(StringBuilder.java:72) at org.apache.sis.io.LineAppender.deleteSoftHyphen(LineAppender.java:333) at org.apache.sis.io.LineAppender.write(LineAppender.java:399) at org.apache.sis.io.LineAppender.append(LineAppender.java:526) at org.apache.sis.util.logging.MonolineFormatter.format(MonolineFormatter.java:669) at java.util.logging.StreamHandler.publish(StreamHandler.java:196) at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105) at java.util.logging.Logger.log(Logger.java:610) (...snip....)