[
https://issues.jboss.org/browse/ISPN-1530?page=com.atlassian.jira.plugin....
]
Dan Berindei reopened ISPN-1530:
--------------------------------
A bounds check is missing in the hex formatting code:
{noformat}
16:01:17,484 ERROR [stderr] (HotRodServerWorker-2-1) java.util.logging.ErrorManager: 5:
Formatting error
16:01:17,484 ERROR [stderr] (HotRodServerWorker-2-1)
java.lang.ArrayIndexOutOfBoundsException: 4
16:01:17,485 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.util.Util.toHexString(Util.java:437)
16:01:17,486 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.util.Util.printArray(Util.java:415)
16:01:17,486 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.util.ByteArrayKey.toString(ByteArrayKey.java:74)
16:01:17,486 ERROR [stderr] (HotRodServerWorker-2-1) at
java.lang.String.valueOf(String.java:2838)
16:01:17,487 ERROR [stderr] (HotRodServerWorker-2-1) at
java.lang.StringBuilder.append(StringBuilder.java:132)
16:01:17,488 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.commands.write.PutKeyValueCommand.toString(PutKeyValueCommand.java:175)
16:01:17,488 ERROR [stderr] (HotRodServerWorker-2-1) at
java.util.Formatter$FormatSpecifier.printString(Formatter.java:2812)
16:01:17,489 ERROR [stderr] (HotRodServerWorker-2-1) at
java.util.Formatter$FormatSpecifier.print(Formatter.java:2693)
16:01:17,490 ERROR [stderr] (HotRodServerWorker-2-1) at
java.util.Formatter.format(Formatter.java:2449)
16:01:17,490 ERROR [stderr] (HotRodServerWorker-2-1) at
java.util.Formatter.format(Formatter.java:2383)
16:01:17,491 ERROR [stderr] (HotRodServerWorker-2-1) at
java.lang.String.format(String.java:2781)
16:01:17,491 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.ExtLogRecord.formatRecord(ExtLogRecord.java:379)
16:01:17,492 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.ExtLogRecord.getFormattedMessage(ExtLogRecord.java:344)
16:01:17,493 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.formatters.Formatters$10.renderRaw(Formatters.java:355)
16:01:17,493 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:146)
16:01:17,493 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:86)
16:01:17,494 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:35)
16:01:17,494 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:49)
16:01:17,495 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:64)
16:01:17,495 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:283)
16:01:17,496 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
16:01:17,496 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
16:01:17,496 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
16:01:17,497 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
16:01:17,497 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.Logger.logRaw(Logger.java:649)
16:01:17,498 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logmanager.Logger.log(Logger.java:600)
16:01:17,498 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logging.JBossLogManagerLogger.doLogf(JBossLogManagerLogger.java:54)
16:01:17,499 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logging.Logger.logf(Logger.java:2112)
16:01:17,499 ERROR [stderr] (HotRodServerWorker-2-1) at
org.jboss.logging.DelegatingBasicLogger.tracef(DelegatingBasicLogger.java:132)
16:01:17,499 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:96)
16:01:17,499 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:64)
16:01:17,500 ERROR [stderr] (HotRodServerWorker-2-1) at
org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61)
{noformat}
Represent byte arrays in hex format when logging
------------------------------------------------
Key: ISPN-1530
URL:
https://issues.jboss.org/browse/ISPN-1530
Project: Infinispan
Issue Type: Enhancement
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 5.1.0.BETA5
Byte arrays are a pain to track in log files. We need a more compact and easier way of
tracking them down, so I suggest from now on we show their HEX representation:
https://gist.github.com/1370843
We can still limit the length, as we do now with byte[], and if you need the full length,
you can carry on using the system property we defined.
--
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