What steps will reproduce the problem?
1.因为我的key种含有空格
2.在checkKey的时候会抛出一个异常
3.但是errorMessage很confuse,java.lang.IllegalArgumentException: Key contains
invalid characters: ``page.list./product/getSizeChart?brandSid=1693&tagSid=206
''
很有迷惑性,我以为``是存在我的key中的非法字符,而空格。
What is the expected output? What do you see instead?
希望一个更好的提示消息帮助问题定位
What version of the product are you using? On what operating system?
Please provide any additional information below.
for (byte b : keyBytes) {
if (b == ' ' || b == '\n' || b == '\r' || b == 0) {
try {
throw new IllegalArgumentException(
"Key contains invalid characters: ``"
+ new String(keyBytes, "utf-8") + "''");
} catch (UnsupportedEncodingException e) {
}
}
Original issue reported on code.google.com by xiaoZ5...@gmail.com on 28 Nov 2011 at 6:28
Original issue reported on code.google.com by
xiaoZ5...@gmail.com
on 28 Nov 2011 at 6:28