提交 2c1c6ec3 编写于 作者: J Jake Wharton

Merge branch 'vml-rmott-thread-name-shorten'

......@@ -301,7 +301,12 @@ public class RestAdapter {
if (!methodInfo.isSynchronous) {
// If we are executing asynchronously then update the current thread with a useful name.
Thread.currentThread().setName(THREAD_PREFIX + url.substring(serverUrl.length()));
int substrEnd = url.indexOf("?", serverUrl.length());
if (substrEnd == -1) {
substrEnd = url.length();
}
Thread.currentThread().setName(THREAD_PREFIX
+ url.substring(serverUrl.length(), substrEnd));
}
if (logLevel.log()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册