"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/impl/client/BasicCookieStore.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.

BasicCookieStore.java  (httpcomponents-client-4.5.6-src):BasicCookieStore.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 29 skipping to change at line 29
* ==================================================================== * ====================================================================
* *
* This software consists of voluntary contributions made by many * This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more * individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see * information on the Apache Software Foundation, please see
* <http://www.apache.org/>. * <http://www.apache.org/>.
* *
*/ */
package org.apache.http.impl.client; package org.apache.http.impl.client;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.apache.http.annotation.Contract; import org.apache.http.annotation.Contract;
skipping to change at line 56 skipping to change at line 58
* *
* *
* @since 4.0 * @since 4.0
*/ */
@Contract(threading = ThreadingBehavior.SAFE) @Contract(threading = ThreadingBehavior.SAFE)
public class BasicCookieStore implements CookieStore, Serializable { public class BasicCookieStore implements CookieStore, Serializable {
private static final long serialVersionUID = -7581093305228232025L; private static final long serialVersionUID = -7581093305228232025L;
private final TreeSet<Cookie> cookies; private final TreeSet<Cookie> cookies;
private final ReadWriteLock lock; private transient ReadWriteLock lock;
public BasicCookieStore() { public BasicCookieStore() {
super(); super();
this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator()); this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator());
this.lock = new ReentrantReadWriteLock(); this.lock = new ReentrantReadWriteLock();
} }
private void readObject(final ObjectInputStream stream) throws IOException,
ClassNotFoundException {
stream.defaultReadObject();
/* Reinstantiate transient fields. */
this.lock = new ReentrantReadWriteLock();
}
/** /**
* Adds an {@link Cookie HTTP cookie}, replacing any existing equivalent coo kies. * Adds an {@link Cookie HTTP cookie}, replacing any existing equivalent coo kies.
* If the given cookie has already expired it will not be added, but existin g * If the given cookie has already expired it will not be added, but existin g
* values will still be removed. * values will still be removed.
* *
* @param cookie the {@link Cookie cookie} to be added * @param cookie the {@link Cookie cookie} to be added
* *
* @see #addCookies(Cookie[]) * @see #addCookies(Cookie[])
* *
*/ */
 End of changes. 3 change blocks. 
1 lines changed or deleted 11 lines changed or added

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