[
https://issues.jboss.org/browse/LOGMGR-42?page=com.atlassian.jira.plugin....
]
Marcus Klimstra updated LOGMGR-42:
----------------------------------
Description:
StringIndexOutOfBoundsException is thrown when the path does not contain a jarName.
In my case path is "/com/.../Foo.class" (from a custom classloader).
Stacktrace:
{code}
java.util.logging.ErrorManager: 5: Formatting error
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.charAt(String.java:686)
at org.jboss.logmanager.formatters.Formatters$12.renderExtended(Formatters.java:524)
at org.jboss.logmanager.formatters.Formatters$12.renderRaw(Formatters.java:388)
at
org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:150)
at org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:86)
at org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:35)
at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:49)
at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:76)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:290)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.Logger.logRaw(Logger.java:721)
at org.jboss.logmanager.Logger.log(Logger.java:539)
{code}
The exception occurs here: (last line with while)
{code:java}
if (jarName == null) {
// OK, that would have been too easy. Next let's just grab the last piece before the
class name
int endIdx = path.lastIndexOf(classResourceName);
if (endIdx != -1) {
do {
endIdx--;
} while (path.charAt(endIdx) == '/' || path.charAt(endIdx) == '\\' ||
path.charAt(endIdx) == '?');
{code}
Since there is nothing before the initial /, endIdx becomes -1.
was:
StringIndexOutOfBoundsException is thrown when the path does not contain a jarName.
In my case path is "/com/.../Foo.class" (from a custom classloader).
Stacktrace:
java.util.logging.ErrorManager: 5: Formatting error
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.charAt(String.java:686)
at org.jboss.logmanager.formatters.Formatters$12.renderExtended(Formatters.java:524)
at org.jboss.logmanager.formatters.Formatters$12.renderRaw(Formatters.java:388)
at
org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:150)
at org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:86)
at org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:35)
at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:49)
at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:76)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:290)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.Logger.logRaw(Logger.java:721)
at org.jboss.logmanager.Logger.log(Logger.java:539)
The exception occurs here: (last line with while)
if (jarName == null) {
// OK, that would have been too easy. Next let's just grab the last piece before the
class name
int endIdx = path.lastIndexOf(classResourceName);
if (endIdx != -1) {
do {
endIdx--;
} while (path.charAt(endIdx) == '/' || path.charAt(endIdx) == '\\' ||
path.charAt(endIdx) == '?');
Since there is nothing before the initial /, endIdx becomes -1.
StringIndexOutOfBoundsException in exceptionFormatStep
------------------------------------------------------
Key: LOGMGR-42
URL:
https://issues.jboss.org/browse/LOGMGR-42
Project: JBoss Log Manager
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: core
Affects Versions: 1.3.1.Final
Reporter: Marcus Klimstra
Assignee: David Lloyd
StringIndexOutOfBoundsException is thrown when the path does not contain a jarName.
In my case path is "/com/.../Foo.class" (from a custom classloader).
Stacktrace:
{code}
java.util.logging.ErrorManager: 5: Formatting error
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.charAt(String.java:686)
at org.jboss.logmanager.formatters.Formatters$12.renderExtended(Formatters.java:524)
at org.jboss.logmanager.formatters.Formatters$12.renderRaw(Formatters.java:388)
at
org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:150)
at
org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:86)
at org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:35)
at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:49)
at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:76)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:290)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:298)
at org.jboss.logmanager.Logger.logRaw(Logger.java:721)
at org.jboss.logmanager.Logger.log(Logger.java:539)
{code}
The exception occurs here: (last line with while)
{code:java}
if (jarName == null) {
// OK, that would have been too easy. Next let's just grab the last piece before
the class name
int endIdx = path.lastIndexOf(classResourceName);
if (endIdx != -1) {
do {
endIdx--;
} while (path.charAt(endIdx) == '/' || path.charAt(endIdx) == '\\' ||
path.charAt(endIdx) == '?');
{code}
Since there is nothing before the initial /, endIdx becomes -1.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira