[slf4j-dev] report bug for slf4 1.5.2 :MessageFormatter's method "arrayFormat" had not check the parameter argArray's Array Type

lizongbo lizongbo at gmail.com
Mon Jul 21 16:01:50 CEST 2008


Sorry for my poor english :(

when i test logback0.9.9 and slf4j 1.5.2 ,I found this bug,
the test code is fllow:


        log.debug("a:{},v:{},float:{},", new Object[] {"A", "C", new float[]
{1, 2, 3}        });

Then  I got the log message is :

2008-07-20 02:11:18,656 DEBUG main a:A,v:C,float:[F at 1b09468,
but I want to got :

2008-07-20 02:13:49,515 DEBUG main a:A,v:C,float:[1.0,2.0,3.0],

so I read the souce and found the bug in MessageFormatter.java.

then I change the code in MessageFormatter.java to fix the bug ..

I got the code from svn :
http://svn.slf4j.org/repos/slf4j/trunk/slf4j-api/src/main/java/
and use "svn  diff MessageFormatter.java >MessageFormatter.java.patch" to
make a patch file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20080721/5df9a23e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MessageFormatter.java.patch
Type: application/octet-stream
Size: 7553 bytes
Desc: not available
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20080721/5df9a23e/attachment.obj>


More information about the slf4j-dev mailing list