Additional fix for #310603: append extra params at the end of the format string.

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1573 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Simone Bordet 2010-04-27 11:41:27 +00:00
parent 48a474dee1
commit 22873ee83d
2 changed files with 24 additions and 8 deletions

View File

@ -124,10 +124,18 @@ public class JavaUtilLog implements Logger
{
int bracesIndex = msg.indexOf(braces, start);
if (bracesIndex < 0)
break;
builder.append(msg.substring(start, bracesIndex));
builder.append(String.valueOf(arg));
start = bracesIndex + braces.length();
{
builder.append(msg.substring(start));
builder.append(" ");
builder.append(String.valueOf(arg));
start = msg.length();
}
else
{
builder.append(msg.substring(start, bracesIndex));
builder.append(String.valueOf(arg));
start = bracesIndex + braces.length();
}
}
builder.append(msg.substring(start));
return builder.toString();

View File

@ -195,10 +195,18 @@ public class StdErrLog implements Logger
{
int bracesIndex = msg.indexOf(braces, start);
if (bracesIndex < 0)
break;
escape(builder, msg.substring(start, bracesIndex));
builder.append(String.valueOf(arg));
start = bracesIndex + braces.length();
{
escape(builder, msg.substring(start));
builder.append(" ");
builder.append(String.valueOf(arg));
start = msg.length();
}
else
{
escape(builder, msg.substring(start, bracesIndex));
builder.append(String.valueOf(arg));
start = bracesIndex + braces.length();
}
}
escape(builder, msg.substring(start));
}