hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r610764 - in /httpcomponents/httpclient/trunk/module-client/src: main/java/org/apache/http/impl/client/ClientParamsStack.java test/java/org/apache/http/impl/conn/Helper.java test/java/org/apache/http/impl/conn/TestLocalServer.java
Date Thu, 10 Jan 2008 12:04:11 GMT
Author: olegk
Date: Thu Jan 10 04:04:10 2008
New Revision: 610764

URL: http://svn.apache.org/viewvc?rev=610764&view=rev
Log:
Renamed SimpleParamStack to DefaultedHttpParams; removed #isParameterSet method from the HttpParams
interface

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/Helper.java
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestLocalServer.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/ClientParamsStack.java?rev=610764&r1=610763&r2=610764&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/ClientParamsStack.java
Thu Jan 10 04:04:10 2008
@@ -222,40 +222,6 @@
         return result;
     }
 
-
-    /**
-     * Checks whether a parameter is set in this stack.
-     *
-     * @param name      the name of the parameter to check for
-     *
-     * @return  <code>true</code> if the parameter is set in this stack,
-     *          <code>false</code> otherwise
-     */
-    public boolean isParameterSet(String name) {
-        if (name == null) {
-            throw new IllegalArgumentException
-                ("Parameter name must not be null.");
-        }
-
-        boolean found = false;
-
-        if (overrideParams != null) {
-            found = overrideParams.isParameterSet(name);
-        }
-        if (!found && (requestParams != null)) {
-            found = requestParams.isParameterSet(name);
-        }
-        if (!found && (clientParams != null)) {
-            found = clientParams.isParameterSet(name);
-        }
-        if (!found && (applicationParams != null)) {
-            found = applicationParams.isParameterSet(name);
-        }
-
-        return found;
-    }
-
-
     /**
      * Does <i>not</i> set a parameter.
      * Parameter stacks are read-only. It is possible, though discouraged,

Modified: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/Helper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/Helper.java?rev=610764&r1=610763&r2=610764&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/Helper.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/Helper.java
Thu Jan 10 04:04:10 2008
@@ -35,7 +35,7 @@
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.SimpleParamStack;
+import org.apache.http.params.DefaultedHttpParams;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpProcessor;
@@ -69,10 +69,10 @@
         ctxt.setAttribute(ExecutionContext.HTTP_TARGET_HOST, target);
         ctxt.setAttribute(ExecutionContext.HTTP_REQUEST, req);
 
-        req.setParams(new SimpleParamStack(req.getParams(), params));
+        req.setParams(new DefaultedHttpParams(req.getParams(), params));
         exec.preProcess(req, proc, ctxt);
         HttpResponse rsp = exec.execute(req, conn, ctxt);
-        rsp.setParams(new SimpleParamStack(rsp.getParams(), params));
+        rsp.setParams(new DefaultedHttpParams(rsp.getParams(), params));
         exec.postProcess(rsp, proc, ctxt);
 
         return rsp;

Modified: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestLocalServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestLocalServer.java?rev=610764&r1=610763&r2=610764&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestLocalServer.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/conn/TestLocalServer.java
Thu Jan 10 04:04:10 2008
@@ -42,7 +42,7 @@
 import org.apache.http.entity.StringEntity;
 import org.apache.http.localserver.LocalTestServer;
 import org.apache.http.localserver.ServerTestBase;
-import org.apache.http.params.SimpleParamStack;
+import org.apache.http.params.DefaultedHttpParams;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.util.EntityUtils;
 
@@ -88,13 +88,13 @@
                 ExecutionContext.HTTP_REQUEST, request);
 
         request.setParams(
-                new SimpleParamStack(request.getParams(), defaultParams));
+                new DefaultedHttpParams(request.getParams(), defaultParams));
         httpExecutor.preProcess
             (request, httpProcessor, httpContext);
         HttpResponse response = httpExecutor.execute
             (request, conn, httpContext);
         response.setParams(
-                new SimpleParamStack(response.getParams(), defaultParams));
+                new DefaultedHttpParams(response.getParams(), defaultParams));
         httpExecutor.postProcess
             (response, httpProcessor, httpContext);
 
@@ -133,13 +133,13 @@
                     ExecutionContext.HTTP_REQUEST, request);
 
             request.setParams(
-                    new SimpleParamStack(request.getParams(), defaultParams));
+                    new DefaultedHttpParams(request.getParams(), defaultParams));
             httpExecutor.preProcess
                 (request, httpProcessor, httpContext);
             HttpResponse response = httpExecutor.execute
                 (request, conn, httpContext);
             response.setParams(
-                    new SimpleParamStack(response.getParams(), defaultParams));
+                    new DefaultedHttpParams(response.getParams(), defaultParams));
             httpExecutor.postProcess
                 (response, httpProcessor, httpContext);
 



Mime
View raw message