// 排序cookie。
Collections.sort(cookiesInfo.cookieList);
if (log.isDebugEnabled()) {
ToStringBuilder buf = new ToStringBuilder();
buf.format("[%s] Loading cookies: %d cookies found", getStoreName(), cookiesInfo.cookieList.size());
if (isEmptyArray(cookiesInfo.checksumList)) {
if (checksum) {
buf.append("\n No checksum cookie");
}
} else {
buf.format("\n %s[expected cookies=%d]=%s", checksumName, cookiesInfo.checksumList.length,
ObjectUtil.toString(cookiesInfo.checksumList));
}
for (CookieInfo cookieInfo : cookiesInfo.cookieList) {
int length = 0;
if (cookieInfo.value != null) {
length = cookieInfo.value.length();
}
buf.format("\n %s[length=%d]=%s", cookieInfo.name, length, cookieInfo.value);
}
log.debug(buf.toString());
}
return cookiesInfo;
}