Additional fix for #310603: append extra params at the end of the format string, but skip them if they're null.

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1574 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Simone Bordet 2010-04-27 11:47:16 +00:00
parent 22873ee83d
commit ac2996b86a
2 changed files with 10 additions and 4 deletions

View File

@ -126,8 +126,11 @@ public class JavaUtilLog implements Logger
if (bracesIndex < 0)
{
builder.append(msg.substring(start));
builder.append(" ");
builder.append(String.valueOf(arg));
if (arg != null)
{
builder.append(" ");
builder.append(arg);
}
start = msg.length();
}
else

View File

@ -197,8 +197,11 @@ public class StdErrLog implements Logger
if (bracesIndex < 0)
{
escape(builder, msg.substring(start));
builder.append(" ");
builder.append(String.valueOf(arg));
if (arg != null)
{
builder.append(" ");
builder.append(arg);
}
start = msg.length();
}
else