sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Created] (SIS-140) IndexOutOfBoundsException in LineAppender
Date Tue, 15 Oct 2013 14:06:42 GMT
Martin Desruisseaux created SIS-140:

             Summary: IndexOutOfBoundsException in LineAppender
                 Key: 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:

LineAppender f = ...;
f.append("First line");
f.append("\tSecond line");

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(
    at java.lang.StringBuilder.charAt(
    at org.apache.sis.util.logging.MonolineFormatter.format(
    at java.util.logging.StreamHandler.publish(
    at java.util.logging.ConsoleHandler.publish(
    at java.util.logging.Logger.log(

This message was sent by Atlassian JIRA

View raw message