Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] got "IllegalFormatConversionException: d != java.lang.String" when enable debug log

Sorry, s/jetty-dev@xxxxxxxxxxxxx/jetty-dev@xxxxxxxxxxx/, my MUA did wrong auto completion....

On 9/20/14 6:55 PM, Yubao Liu wrote:
Hi all,

This commit introduces a minor bug,  it uses "%d" to format BufferUtil.toString(_lastModifiedBytes),
this will trigger exception when enable debug log.

https://github.com/eclipse/jetty.project/commit/2af613a28b1ea51e5aca5cb9ffe3989147749568?diff=unified#diff-2


@@ -504,7 +504,7 @@ public ReadableByteChannel getReadableByteChannel() throws IOException
@Override
public String toString()
{
    - return String.format("%s %s %d %s %s",_resource,_resource.exists(),_resource.lastModified(),_contentType,_lastModifiedBytes);
    + return String.format("CachedContent@%x{r=%s,e=%b,lm=%d,ct=%s}",hashCode(),_resource,_resource.exists(),BufferUtil.toString(_lastModifiedBytes),_contentType);
}
}
}

Regards,
Yubao Liu



Back to the top