You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2013/10/15 16:32:42 UTC
[jira] [Resolved] (SIS-140) IndexOutOfBoundsException in
LineAppender
[ https://issues.apache.org/jira/browse/SIS-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Desruisseaux resolved SIS-140.
-------------------------------------
Resolution: Fixed
> IndexOutOfBoundsException in LineAppender
> -----------------------------------------
>
> Key: SIS-140
> URL: https://issues.apache.org/jira/browse/SIS-140
> Project: Spatial Information Systems
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 0.3
> Reporter: Martin Desruisseaux
> Assignee: Martin Desruisseaux
> Fix For: 0.4
>
>
> 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:
> {code:java}
> LineAppender f = ...;
> f.append("First line");
> f.flush();
> f.append("\tSecond line");
> {code}
> This cause {{MonolineFormatter}} to fail to log some events. The symptom is the following stack trace:
> {noformat}
> 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....)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1#6144)