fix logging of chars < 32

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@549356 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2007-06-21 04:08:06 +00:00
parent 054a5b4406
commit 75c74dd595
1 changed files with 2 additions and 3 deletions

View File

@ -191,9 +191,8 @@ public class StrUtils {
char ch = val.charAt(i);
if (ch < 32) {
dest.append('%');
// Hmmm, if we used StringBuilder rather than Appendable, it
// could add an integer more efficiently.
dest.append(Integer.toString(ch));
if (ch < 0x10) dest.append('0');
dest.append(Integer.toHexString(ch));
} else {
switch (ch) {
case ' ': dest.append('+'); break;