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

View File

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