Index: java/org/apache/commons/httpclient/methods/PostMethod.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v retrieving revision 1.45.2.2 diff -u -r1.45.2.2 PostMethod.java --- java/org/apache/commons/httpclient/methods/PostMethod.java 9 Aug 2003 19:36:39 -0000 1.45.2.2 +++ java/org/apache/commons/httpclient/methods/PostMethod.java 11 Sep 2003 07:26:30 -0000 @@ -398,7 +398,7 @@ throw new IllegalArgumentException( "Argument passed to removeParameter(String) cannot be null"); } - boolean removed = true; + boolean removed = false; Iterator iter = this.params.iterator(); while (iter.hasNext()) { Index: test/org/apache/commons/httpclient/TestWebappPostMethod.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappPostMethod.java,v retrieving revision 1.3 diff -u -r1.3 TestWebappPostMethod.java --- test/org/apache/commons/httpclient/TestWebappPostMethod.java 5 Mar 2003 04:02:56 -0000 1.3 +++ test/org/apache/commons/httpclient/TestWebappPostMethod.java 11 Sep 2003 07:26:30 -0000 @@ -224,5 +224,16 @@ verifyParams(method); } + /** + * Test the return value of the PostMethod#removeParameter. + */ + public void testRemoveParameterReturnValue() throws Exception { + PostMethod method = new PostMethod(paramsPath); + + method.addParameter("param", "whatever"); + assertTrue("Return value of the method is expected to be true", method.removeParameter("param")); + assertFalse("Return value of the method is expected to be false", method.removeParameter("param")); + } + }