"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

RFC2109Spec.java  (httpcomponents-client-4.5.6-src):RFC2109Spec.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 146 skipping to change at line 146
public List<Header> formatCookies(final List<Cookie> cookies) { public List<Header> formatCookies(final List<Cookie> cookies) {
Args.notEmpty(cookies, "List of cookies"); Args.notEmpty(cookies, "List of cookies");
final List<Cookie> cookieList; final List<Cookie> cookieList;
if (cookies.size() > 1) { if (cookies.size() > 1) {
// Create a mutable copy and sort the copy. // Create a mutable copy and sort the copy.
cookieList = new ArrayList<Cookie>(cookies); cookieList = new ArrayList<Cookie>(cookies);
Collections.sort(cookieList, CookiePathComparator.INSTANCE); Collections.sort(cookieList, CookiePathComparator.INSTANCE);
} else { } else {
cookieList = cookies; cookieList = cookies;
} }
if (this.oneHeader) { return this.oneHeader ? doFormatOneHeader(cookieList) : doFormatManyHead
return doFormatOneHeader(cookieList); ers(cookieList);
} else {
return doFormatManyHeaders(cookieList);
}
} }
private List<Header> doFormatOneHeader(final List<Cookie> cookies) { private List<Header> doFormatOneHeader(final List<Cookie> cookies) {
int version = Integer.MAX_VALUE; int version = Integer.MAX_VALUE;
// Pick the lowest common denominator // Pick the lowest common denominator
for (final Cookie cookie : cookies) { for (final Cookie cookie : cookies) {
if (cookie.getVersion() < version) { if (cookie.getVersion() < version) {
version = cookie.getVersion(); version = cookie.getVersion();
} }
} }
 End of changes. 1 change blocks. 
5 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)