hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1100593 - in /httpcomponents/httpcore/branches/4.1.x: ./ httpcore-nio/src/main/java/org/apache/http/impl/nio/ httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/ httpcore-nio/src/main/java/org/apache/http/nio/entity/ httpcore-nio/...
Date Sat, 07 May 2011 19:02:59 GMT
Author: olegk
Date: Sat May  7 19:02:58 2011
New Revision: 1100593

URL: http://svn.apache.org/viewvc?rev=1100593&view=rev
Log:
4.1.x branch

Added:
    httpcomponents/httpcore/branches/4.1.x/   (props changed)
      - copied from r1096488, httpcomponents/httpcore/trunk/
    httpcomponents/httpcore/branches/4.1.x/RELEASE_NOTES.txt
      - copied unchanged from r1096489, httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
      - copied, changed from r1100590, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
      - copied, changed from r1100590, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/nio/entity/ContentInputStream.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/ContentInputStream.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/nio/entity/ContentListener.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/ContentListener.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/nio/entity/ContentOutputStream.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/ContentOutputStream.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/nio/entity/SkipContentListener.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/SkipContentListener.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NHttpHandlerBase.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/NHttpHandlerBase.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/SimpleNHttpRequestHandler.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/test/java/org/apache/http/SimpleIOReactorExceptionHandler.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SimpleIOReactorExceptionHandler.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestExecutionHandler.java
    httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/RequestHandler.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/Header.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/Header.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/HttpHeaders.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHeaders.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/BasicHttpEntity.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java
      - copied unchanged from r1096489, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/InputStreamEntity.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
      - copied, changed from r1100590, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java
      - copied, changed from r1100590, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
      - copied, changed from r1100590, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/HttpParams.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpParams.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/util/LangUtils.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/LangUtils.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java
      - copied unchanged from r1100588, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java
      - copied, changed from r1100588, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java
Removed:
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/HttpParamsNames.java
Modified:
    httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestBasicHttpParams.java

Propchange: httpcomponents/httpcore/branches/4.1.x/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat May  7 19:02:58 2011
@@ -0,0 +1,9 @@
+
+.project
+.classpath
+bin
+lib
+.settings
+dist
+target
+.pmd

Propchange: httpcomponents/httpcore/branches/4.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sat May  7 19:02:58 2011
@@ -0,0 +1 @@
+/httpcomponents/httpcore/branches/ibm_compat_branch:755687-758898

Copied: httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
(from r1100590, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java?p2=httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java&r1=1100590&r2=1100593&rev=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
Sat May  7 19:02:58 2011
@@ -160,17 +160,6 @@ public class NHttpConnectionBase
     }
 
     /**
-     * @since 4.2
-     */
-    protected void bind(final IOSession session) {
-        if (session == null) {
-            throw new IllegalArgumentException("I/O session may not be null");
-        }
-        this.session.setBufferStatus(null);
-        setSession(session);
-    }
-
-    /**
      * @since 4.1
      */
     protected HttpTransportMetricsImpl createTransportMetrics() {

Copied: httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
(from r1100590, httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java?p2=httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java&p1=httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java&r1=1100590&r2=1100593&rev=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
Sat May  7 19:02:58 2011
@@ -35,7 +35,6 @@ import org.apache.http.params.HttpParams
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 import javax.net.ssl.SSLEngineResult;
-import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLEngineResult.HandshakeStatus;
 import javax.net.ssl.SSLEngineResult.Status;
 import javax.net.ssl.SSLException;
@@ -143,13 +142,6 @@ public class SSLIOSession implements IOS
         doHandshake();
     }
 
-    /**
-     * @since 4.2
-     */
-    public synchronized SSLSession getSSLSession() {
-        return this.sslEngine.getSession();
-    }
-
     private void doHandshake() throws SSLException {
         boolean handshaking = true;
 

Copied: httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
(from r1100590, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java?p2=httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java&p1=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java&r1=1100590&r2=1100593&rev=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/AbstractHttpParams.java
Sat May  7 19:02:58 2011
@@ -27,11 +27,8 @@
 
 package org.apache.http.params;
 
-import java.util.Set;
-
 import org.apache.http.params.HttpParams;
 
-
 /**
  * Abstract base class for parameter collections.
  * Type specific setters and getters are mapped to the abstract,
@@ -39,7 +36,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  */
-public abstract class AbstractHttpParams implements HttpParams, HttpParamsNames {
+public abstract class AbstractHttpParams implements HttpParams {
 
     /**
      * Instantiates parameters.
@@ -108,16 +105,4 @@ public abstract class AbstractHttpParams
         return !getBooleanParameter(name, false);
     }
 
-    /**
-     * {@inheritDoc}
-     * <p>
-     * Dummy implementation - must be overridden by subclasses.
-     *
-     * @since 4.2
-     * @throws UnsupportedOperationException - always
-     */
-    public Set getNames(){
-        throw new UnsupportedOperationException();
-    }
-
 } // class AbstractHttpParams

Copied: httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java
(from r1100590, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java?p2=httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java&p1=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java&r1=1100590&r2=1100593&rev=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/BasicHttpParams.java
Sat May  7 19:02:58 2011
@@ -28,11 +28,9 @@
 package org.apache.http.params;
 
 import java.io.Serializable;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Set;
 
 import org.apache.http.params.HttpParams;
 
@@ -150,14 +148,7 @@ public class BasicHttpParams extends Abs
         return clone;
     }
 
-    /**
-     * Copies the locally defined parameters to the argument parameters.
-     * This method is called from {@link #clone()}.
-     *
-     * @param target    the parameters to which to copy
-     * @since 4.2
-     */
-    public void copyParams(HttpParams target) {
+    private void copyParams(HttpParams target) {
         Iterator iter = parameters.entrySet().iterator();
         while (iter.hasNext()) {
             Map.Entry me = (Map.Entry) iter.next();
@@ -166,16 +157,4 @@ public class BasicHttpParams extends Abs
         }
     }
 
-    /**
-     * Returns the current set of names.
-     *
-     * Changes to the underlying HttpParams are not reflected
-     * in the set - it is a snapshot.
-     *
-     * @return the names, as a Set<String>
-     * @since 4.2
-     */
-    public Set getNames() {
-        return new HashSet(parameters.keySet());
-    }
 }

Copied: httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
(from r1100590, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java?p2=httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java&p1=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java&r1=1100590&r2=1100593&rev=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
Sat May  7 19:02:58 2011
@@ -27,11 +27,6 @@
 
 package org.apache.http.params;
 
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.http.params.HttpParams;
-
 /**
  * {@link HttpParams} implementation that delegates resolution of a parameter
  * to the given default {@link HttpParams} instance if the parameter is not
@@ -102,63 +97,9 @@ public final class DefaultedHttpParams e
     /**
      *
      * @return the default HttpParams collection
-     * @deprecated (4.2) do not use, will be removed in a later version
      */
     public HttpParams getDefaults() {
         return this.defaults;
     }
 
-    /**
-     * Returns the current set of names
-     * from both the local and default HttpParams instances.
-     *
-     * Changes to the underlying HttpParams intances are not reflected
-     * in the set - it is a snapshot.
-     *
-     * @return the combined set of names, as a Set<String>
-     * @since 4.2
-     * @throws UnsupportedOperationException if either the local or default HttpParams instances
do not implement HttpParamsNames
-     */
-    public Set getNames() {
-        Set combined = new HashSet(getNames(defaults));
-        combined.addAll(getNames(local));
-        return combined ;
-    }
-
-    /**
-     * Returns the current set of defaults names.
-     *
-     * Changes to the underlying HttpParams are not reflected
-     * in the set - it is a snapshot.
-     *
-     * @return the names, as a Set<String>
-     * @since 4.2
-     * @throws UnsupportedOperationException if the default HttpParams instance does not
implement HttpParamsNames
-     */
-    public Set getDefaultNames() {
-        return new HashSet(getNames(defaults));
-    }
-
-    /**
-     * Returns the current set of local names.
-     *
-     * Changes to the underlying HttpParams are not reflected
-     * in the set - it is a snapshot.
-     *
-     * @return the names, as a Set<String>
-     * @since 4.2
-     * @throws UnsupportedOperationException if the local HttpParams instance does not implement
HttpParamsNames
-     */
-    public Set getLocalNames() {
-        return new HashSet(getNames(local));
-    }
-
-    // Helper method
-    private Set getNames(HttpParams params) {
-        if (params instanceof HttpParamsNames) {
-            return ((HttpParamsNames) params).getNames();
-        }
-        throw new UnsupportedOperationException("HttpParams instance does not implement HttpParamsNames");
-    }
-
 }

Modified: httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestBasicHttpParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestBasicHttpParams.java?rev=1100593&r1=1096488&r2=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestBasicHttpParams.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestBasicHttpParams.java
Sat May  7 19:02:58 2011
@@ -27,9 +27,6 @@
 
 package org.apache.http.params;
 
-import java.util.Iterator;
-import java.util.Set;
-
 import junit.framework.TestCase;
 
 /**
@@ -56,19 +53,4 @@ public class TestBasicHttpParams extends
                 params.removeParameter("param1"));
     }
 
-    public void testgetNames() {
-        BasicHttpParams params = new BasicHttpParams();
-        Set nameSet = params.getNames();
-        assertTrue(nameSet.isEmpty());
-        params.setBooleanParameter("true", true);
-        assertTrue(nameSet.isEmpty()); // Still empty, as it is a snapshot
-        nameSet = params.getNames();
-        assertFalse(nameSet.isEmpty());
-        assertEquals(1, nameSet.size());
-        Iterator iterator = nameSet.iterator(); // refetch, as iterator is a snapshot
-        assertTrue("Iterator has an entry",iterator.hasNext());
-        String entry = (String) iterator.next();
-        // Note: Java 1.3 requires JUnit 3.8.1 which does not have assertTrue(Boolean)
-        assertTrue(((Boolean) params.getParameter(entry)).booleanValue());
-    }
 }

Copied: httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java
(from r1100588, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java?p2=httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java&p1=httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java&r1=1100588&r2=1100593&rev=1100593&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java
(original)
+++ httpcomponents/httpcore/branches/4.1.x/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java
Sat May  7 19:02:58 2011
@@ -27,8 +27,6 @@
 
 package org.apache.http.params;
 
-import java.util.Set;
-
 import junit.framework.TestCase;
 
 /**
@@ -45,14 +43,8 @@ public class TestDefaultedHttpParams ext
         DefaultedHttpParams deflt = new DefaultedHttpParams(new BasicHttpParams(), new BasicHttpParams());
         assertFalse("The parameter should not be removed successfully", deflt.removeParameter("param1"));
         deflt.setParameter("param1", "paramValue1");
-        assertEquals(0, deflt.getDefaultNames().size());
-        assertEquals(1, deflt.getNames().size());
-        assertEquals(1, deflt.getLocalNames().size());
         assertTrue("The parameter should be removed successfully", deflt.removeParameter("param1"));
         assertFalse("The parameter should not be present", deflt.removeParameter("param1"));
-        assertEquals(0, deflt.getDefaultNames().size());
-        assertEquals(0, deflt.getNames().size());
-        assertEquals(0, deflt.getLocalNames().size());
     }
 
     public void testEmptyParams() {
@@ -60,39 +52,6 @@ public class TestDefaultedHttpParams ext
         assertNull("The parameter should not be present", deflt.getParameter("param1"));
         //try a remove from an empty params
         assertFalse("The parameter should not be present", deflt.removeParameter("param1"));
-
-        assertEquals(0, deflt.getNames().size());
-        assertEquals(0, deflt.getLocalNames().size());
-        assertEquals(0, deflt.getDefaultNames().size());
-    }
-
-    private HttpParams addParams(String name){
-        BasicHttpParams params = new BasicHttpParams();
-        params.setParameter("common","both");
-        params.setParameter(name,"value");
-        return params;
     }
 
-    public void testgetNames() {
-        DefaultedHttpParams params = new DefaultedHttpParams(addParams("local"), addParams("default"));
-
-        Set nameSet = params.getNames();
-        assertEquals(3, nameSet.size());
-        Set localnameSet = params.getLocalNames();
-        assertEquals(2, localnameSet.size());
-        Set defaultnameSet = params.getDefaultNames();
-        assertEquals(2, defaultnameSet.size());
-
-        params.setParameter("new", null);
-        assertEquals(3, nameSet.size()); // Name set not yet updated
-        assertEquals(2, localnameSet.size());
-        assertEquals(2, defaultnameSet.size());
-
-        nameSet = params.getNames();
-        localnameSet = params.getLocalNames();
-        defaultnameSet = params.getDefaultNames();
-        assertEquals(4, nameSet.size());
-        assertEquals(3, localnameSet.size());
-        assertEquals(2, defaultnameSet.size());
-    }
 }



Mime
View raw message