You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by mb...@apache.org on 2003/04/20 00:29:33 UTC
cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods TraceMethod.java PostMethod.java EntityEnclosingMethod.java
mbecke 2003/04/19 15:29:32
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpState.java HostConfiguration.java
ChunkedOutputStream.java Authenticator.java
httpclient/src/java/org/apache/commons/httpclient/auth
HttpAuthenticator.java HttpAuthRealm.java
httpclient/src/java/org/apache/commons/httpclient/util
URIUtil.java
httpclient/src/java/org/apache/commons/httpclient/methods
TraceMethod.java PostMethod.java
EntityEnclosingMethod.java
Log:
General code cleanup. Fixed style problems and javadoc warnings.
Remove unused private variables.
Revision Changes Path
1.21 +21 -18 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java
Index: HttpState.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- HttpState.java 7 Apr 2003 19:23:36 -0000 1.20
+++ HttpState.java 19 Apr 2003 22:29:31 -0000 1.21
@@ -431,7 +431,7 @@
*/
public synchronized void setCredentials(String realm, String host, Credentials credentials) {
- LOG.trace(
+ LOG.trace(
"enter HttpState.setCredentials(String realm, String host, Credentials credentials)");
credMap.put(new HttpAuthRealm(host, realm), credentials);
}
@@ -491,8 +491,8 @@
*/
public synchronized Credentials getCredentials(String realm, String host) {
- LOG.trace("enter HttpState.getCredentials(String, String");
- return matchCredentials(this.credMap, realm, host);
+ LOG.trace("enter HttpState.getCredentials(String, String");
+ return matchCredentials(this.credMap, realm, host);
}
/**
@@ -533,7 +533,7 @@
* <p>
* Any previous credentials for this realm will be overwritten.
*
- * @depreciated This method does not differentiate between realms with
+ * @deprecated This method does not differentiate between realms with
* the same name on different servers. Use
* {@link #setProxyCredentials(String, String, Credentials)} instead.
*
@@ -551,9 +551,9 @@
}
/**
- * Set the for the proxy with the given authentication realm.
+ * Set the credentials for the proxy with the given authentication realm.
*
- * When <i>realm</i> and <i>host</i> are <code>null</code>, I'll use the given
+ * When <i>realm</i> and <i>proxyHost</i> are <code>null</code>, I'll use the given
* <i>credentials</i> when no other {@link Credentials} have
* been supplied for the given challenging realm.
* (I.e., use a <code>null</code> realm to set the "default"
@@ -563,15 +563,19 @@
* Any previous credentials for this realm will be overwritten.
*
* @param realm the authentication realm
+ * @param proxyHost the proxy host
* @param credentials the authentication credentials for the given realm
*
* @see #getProxyCredentials(String)
* @see #setCredentials(String, Credentials)
*
*/
-
- public synchronized void setProxyCredentials(String realm, String proxyHost, Credentials credentials) {
- LOG.trace("enter HttpState.setProxyCredentials(String, String, Credentials");
+ public synchronized void setProxyCredentials(
+ String realm,
+ String proxyHost,
+ Credentials credentials
+ ) {
+ LOG.trace("enter HttpState.setProxyCredentials(String, String, Credentials");
proxyCred.put(new HttpAuthRealm(proxyHost, realm), credentials);
}
@@ -608,15 +612,14 @@
* <code>null</code>.
*
* @param realm the authentication realm
- * @param host the host the realm is on
+ * @param proxyHost the proxy host the realm is on
* @return the credentials
* @see #setProxyCredentials(String, String, Credentials)
*/
-
- public synchronized Credentials getProxyCredentials(String realm, String proxyHost) {
- LOG.trace("enter HttpState.getCredentials(String, String");
+ public synchronized Credentials getProxyCredentials(String realm, String proxyHost) {
+ LOG.trace("enter HttpState.getCredentials(String, String");
return matchCredentials(this.proxyCred, realm, proxyHost);
- }
+ }
/**
* Return a string representation of this object.
1.10 +4 -5 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java
Index: HostConfiguration.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- HostConfiguration.java 9 Apr 2003 18:37:59 -0000 1.9
+++ HostConfiguration.java 19 Apr 2003 22:29:31 -0000 1.10
@@ -276,9 +276,8 @@
/**
- * Set the given host. Select default protocol and port.
+ * Set the given host. Select default protocol and port.
* @param host The host.
- * @param port The port
*/
public synchronized void setHost(String host) {
Protocol defaultProtocol = Protocol.getProtocol("http");
1.10 +4 -7 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
Index: ChunkedOutputStream.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ChunkedOutputStream.java 28 Feb 2003 12:48:58 -0000 1.9
+++ ChunkedOutputStream.java 19 Apr 2003 22:29:31 -0000 1.10
@@ -111,9 +111,6 @@
/** The underlying output stream to which we will write data */
private OutputStream stream = null;
- /** True if printing a chunk */
- private boolean writingChunk = false;
-
// ----------------------------------------------------------- Constructors
/**
1.45 +7 -5 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Authenticator.java
Index: Authenticator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Authenticator.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Authenticator.java 7 Apr 2003 19:23:36 -0000 1.44
+++ Authenticator.java 19 Apr 2003 22:29:31 -0000 1.45
@@ -144,7 +144,8 @@
* supported
* @see HttpState#setCredentials(String,Credentials)
*
- * @deprecated use {@link HttpAuthenticator#authenticate(AuthScheme, HttpMethod, HttpState)}
+ * @deprecated use {@link
+ * HttpAuthenticator#authenticate(AuthScheme, HttpMethod, HttpConnection, HttpState)}
*/
public static boolean authenticate(HttpMethod method, HttpState state)
throws HttpException, UnsupportedOperationException {
@@ -167,7 +168,8 @@
* not supported
* @see HttpState#setProxyCredentials(String,Credentials)
*
- * @deprecated use {@link HttpAuthenticator#authenticateProxy(AuthScheme,HttpMethod,HttpState)}
+ * @deprecated use {@link
+ * HttpAuthenticator#authenticateProxy(AuthScheme, HttpMethod, HttpConnection, HttpState)}
*/
public static boolean authenticateProxy(HttpMethod method, HttpState state)
throws HttpException, UnsupportedOperationException {
1.5 +11 -7 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/HttpAuthenticator.java
Index: HttpAuthenticator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/HttpAuthenticator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HttpAuthenticator.java 7 Apr 2003 19:23:36 -0000 1.4
+++ HttpAuthenticator.java 19 Apr 2003 22:29:32 -0000 1.5
@@ -239,7 +239,8 @@
HttpConnection conn,
HttpState state)
throws AuthenticationException {
- LOG.trace("enter HttpAuthenticator.authenticateDefault(HttpMethod, HttpConnection, HttpState)");
+ LOG.trace(
+ "enter HttpAuthenticator.authenticateDefault(HttpMethod, HttpConnection, HttpState)");
return doAuthenticateDefault(method, conn, state, false);
}
@@ -307,8 +308,9 @@
LOG.debug("Using '" + realm + "' authentication realm");
}
}
- Credentials credentials = proxy ?
- state.getProxyCredentials(realm, host) : state.getCredentials(realm, host);
+ Credentials credentials = proxy
+ ? state.getProxyCredentials(realm, host)
+ : state.getCredentials(realm, host);
if (credentials == null) {
throw new AuthenticationException(
"No credentials available for the " + authscheme.getSchemeName()
@@ -348,7 +350,9 @@
HttpConnection conn,
HttpState state)
throws AuthenticationException {
- LOG.trace("enter HttpAuthenticator.authenticate(AuthScheme, HttpMethod, HttpConnection, HttpState)");
+ LOG.trace(
+ "enter HttpAuthenticator.authenticate(AuthScheme, HttpMethod, HttpConnection, "
+ + "HttpState)");
return doAuthenticate(authscheme, method, conn, state, false);
}
1.2 +3 -3 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/HttpAuthRealm.java
Index: HttpAuthRealm.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/HttpAuthRealm.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HttpAuthRealm.java 7 Apr 2003 19:23:36 -0000 1.1
+++ HttpAuthRealm.java 19 Apr 2003 22:29:32 -0000 1.2
@@ -124,10 +124,10 @@
if (!(o instanceof HttpAuthRealm)) {
return super.equals(o);
}
- HttpAuthRealm that = (HttpAuthRealm)o;
+ HttpAuthRealm that = (HttpAuthRealm) o;
return
- domainAttribMatch(this.domain, that.domain) &&
- realmAttribMatch(this.realm, that.realm);
+ domainAttribMatch(this.domain, that.domain)
+ && realmAttribMatch(this.realm, that.realm);
}
/**
1.20 +120 -51 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/URIUtil.java
Index: URIUtil.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/URIUtil.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- URIUtil.java 6 Apr 2003 22:31:54 -0000 1.19
+++ URIUtil.java 19 Apr 2003 22:29:32 -0000 1.20
@@ -92,7 +92,7 @@
* @return the basename string; an empty string if the path ends with slash
*/
public static String getName(String uri) {
- if (uri == null || uri.length() == 0) return uri;
+ if (uri == null || uri.length() == 0) { return uri; }
String path = URIUtil.getPath(uri);
int at = path.lastIndexOf("/");
int to = path.length();
@@ -107,21 +107,26 @@
* @return the query string; <code>null</code> if empty or undefined
*/
public static String getQuery(String uri) {
- if (uri == null || uri.length() == 0) return null;
+ if (uri == null || uri.length() == 0) { return null; }
// consider of net_path
int at = uri.indexOf("//");
- int from = uri.indexOf("/", at >= 0 ?
- (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0);
+ int from = uri.indexOf(
+ "/",
+ at >= 0 ? (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0
+ );
// the authority part of URI ignored
int to = uri.length();
// reuse the at and from variables to consider the query
at = uri.indexOf("?", from);
if (at >= 0) {
from = at + 1;
- } else return null;
+ } else {
+ return null;
+ }
// check the fragment
- if (uri.lastIndexOf("#") > from)
+ if (uri.lastIndexOf("#") > from) {
to = uri.lastIndexOf("#");
+ }
// get the path and query.
return (from < 0 || from == to) ? null : uri.substring(from, to);
}
@@ -134,19 +139,25 @@
* @return the path string
*/
public static String getPath(String uri) {
- if (uri == null) return null;
+ if (uri == null) {
+ return null;
+ }
// consider of net_path
int at = uri.indexOf("//");
- int from = uri.indexOf("/", at >= 0 ?
- (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0);
+ int from = uri.indexOf(
+ "/",
+ at >= 0 ? (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0
+ );
// the authority part of URI ignored
int to = uri.length();
// check the query
- if (uri.indexOf('?', from) != -1)
+ if (uri.indexOf('?', from) != -1) {
to = uri.indexOf('?', from);
+ }
// check the fragment
- if (uri.lastIndexOf("#") > from && uri.lastIndexOf("#") < to)
+ if (uri.lastIndexOf("#") > from && uri.lastIndexOf("#") < to) {
to = uri.lastIndexOf("#");
+ }
// get only the path.
return (from < 0) ? (at >= 0 ? "/" : uri) : uri.substring(from, to);
}
@@ -159,17 +170,22 @@
* @return the path and query string
*/
public static String getPathQuery(String uri) {
- if (uri == null) return null;
+ if (uri == null) {
+ return null;
+ }
// consider of net_path
int at = uri.indexOf("//");
- int from = uri.indexOf("/", at >= 0 ?
- (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0);
+ int from = uri.indexOf(
+ "/",
+ at >= 0 ? (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0
+ );
// the authority part of URI ignored
int to = uri.length();
// Ignore the '?' mark so to ignore the query.
// check the fragment
- if (uri.lastIndexOf("#") > from)
+ if (uri.lastIndexOf("#") > from) {
to = uri.lastIndexOf("#");
+ }
// get the path and query.
return (from < 0) ? (at >= 0 ? "/" : uri) : uri.substring(from, to);
}
@@ -182,11 +198,15 @@
* @return the string from the path part
*/
public static String getFromPath(String uri) {
- if (uri == null) return null;
+ if (uri == null) {
+ return null;
+ }
// consider of net_path
int at = uri.indexOf("//");
- int from = uri.indexOf("/", at >= 0 ?
- (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0);
+ int from = uri.indexOf(
+ "/",
+ at >= 0 ? (uri.lastIndexOf("/", at - 1) >= 0 ? 0 : at + 2) : 0
+ );
// get the path and its rest.
return (from < 0) ? (at >= 0 ? "/" : uri) : uri.substring(from);
}
@@ -200,7 +220,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -217,7 +239,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodeAll(String unescaped, String charset)
@@ -235,7 +259,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -255,7 +281,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodeWithinAuthority(String unescaped, String charset)
@@ -271,7 +299,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -287,7 +317,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodePathQuery(String unescaped, String charset)
@@ -312,7 +344,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -333,7 +367,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodeWithinPath(String unescaped, String charset)
@@ -349,7 +385,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -365,7 +403,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodePath(String unescaped, String charset)
@@ -384,7 +424,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -405,7 +447,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodeWithinQuery(String unescaped, String charset)
@@ -424,7 +468,9 @@
*
* @param unescaped an unescaped string
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see #encode
*/
@@ -443,7 +489,9 @@
* @param unescaped an unescaped string
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see #encode
*/
public static String encodeQuery(String unescaped, String charset)
@@ -460,7 +508,9 @@
* @param unescaped a string
* @param allowed allowed characters not to be escaped
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see Coder#encode
*/
@@ -479,7 +529,9 @@
* @param allowed allowed characters not to be escaped
* @param charset the charset
* @return the escaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see Coder#encode
*/
public static String encode(String unescaped, BitSet allowed,
@@ -495,10 +547,12 @@
*
* @param escaped a string
* @return the unescaped string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
* @see Coder#decode
- */
+ */
public static String decode(String escaped) throws URIException {
return Coder.decode(escaped.toCharArray(), URI.getDefaultProtocolCharset());
}
@@ -510,9 +564,11 @@
* @param escaped a string
* @param charset the charset
* @return the unescaped string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
+ *
* @see Coder#decode
- */
+ */
public static String decode(String escaped, String charset)
throws URIException {
@@ -527,11 +583,16 @@
*
* @param target a target string
* @return the protocol character encoded string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultProtocolCharset
*/
public static String toProtocolCharset(String target) throws URIException {
- return toUsingCharset(target, URI.getDefaultDocumentCharset(), URI.getDefaultProtocolCharset());
+ return toUsingCharset(
+ target,
+ URI.getDefaultDocumentCharset(),
+ URI.getDefaultProtocolCharset());
}
@@ -542,7 +603,8 @@
* @param target a target string
* @param charset the transformed protocol charset
* @return the protocol character encoded string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
*/
public static String toProtocolCharset(String target, String charset)
throws URIException {
@@ -557,7 +619,9 @@
*
* @param target a target string
* @return the document character encoded string
- * @exception URIException
+ *
+ * @throws URIException if the default protocol charset is not supported
+ *
* @see URI#getDefaultDocumentCharset
*/
public static String toDocumentCharset(String target) throws URIException {
@@ -573,7 +637,8 @@
* @param target a target string
* @param charset the transformed document charset
* @return the document character encoded string
- * @exception URIException
+ *
+ * @throws URIException if the charset is not supported
*/
public static String toDocumentCharset(String target, String charset)
throws URIException {
@@ -595,7 +660,8 @@
* @param fromCharset the previous charset
* @param toCharset the changing charset
* @return the document character encoded string
- * @exception URIException
+ *
+ * @throws URIException if either of the charsets are not supported
*/
public static String toUsingCharset(String target, String fromCharset,
@@ -624,8 +690,9 @@
* @param unescapedComponent an unescaped component
* @param allowed allowed characters not to be escaped
* @param charset the charset to encode
- * @exception URIException
* @return the escaped and encoded string
+ *
+ * @throws URIException if the charset is not supported
*/
public static char[] encode(String unescapedComponent, BitSet allowed, String charset)
throws URIException {
@@ -639,8 +706,9 @@
*
* @param escapedComponent an being-unescaped component
* @param charset the charset to decode
- * @exception URIException
* @return the escaped and encoded string
+ *
+ * @throws URIException if the charset is not supported
*/
public static String decode(char[] escapedComponent, String charset)
throws URIException {
@@ -662,8 +730,9 @@
return false;
} else if (c == '%') {
if (Character.digit(original[++i], 16) == -1
- || Character.digit(original[++i], 16) == -1)
+ || Character.digit(original[++i], 16) == -1) {
return false;
+ }
}
}
return true;
1.12 +2 -8 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/TraceMethod.java
Index: TraceMethod.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/TraceMethod.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TraceMethod.java 2 Feb 2003 04:30:13 -0000 1.11
+++ TraceMethod.java 19 Apr 2003 22:29:32 -0000 1.12
@@ -64,8 +64,6 @@
package org.apache.commons.httpclient.methods;
import org.apache.commons.httpclient.HttpMethodBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* Implements the HTTP TRACE specification.
@@ -92,12 +90,8 @@
*
*/
public class TraceMethod extends HttpMethodBase {
- //~ Static variables/initializers ������������������������������������������
- /** Log object for this class. */
- private static final Log LOG = LogFactory.getLog(TraceMethod.class);
-
- //~ Constructors �����������������������������������������������������������
+ //~ Constructors
/**
* Constructor specifying a URI.
@@ -112,7 +106,7 @@
setFollowRedirects(false);
}
- //~ Methods ����������������������������������������������������������������
+ //~ Methods
/**
* Returns <tt>"TRACE"</tt>.
1.42 +13 -14 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java
Index: PostMethod.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PostMethod.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- PostMethod.java 17 Apr 2003 11:34:19 -0000 1.41
+++ PostMethod.java 19 Apr 2003 22:29:32 -0000 1.42
@@ -206,11 +206,10 @@
}
/**
- * Clears request body
+ * Clears request body.
*
- * <P>This method must be overwritten by sub-classes that implement
- * alternative request content input methods
- * </p>
+ * <p>This method must be overwritten by sub-classes that implement
+ * alternative request content input methods</p>
*
* @since 2.0beta1
*/
@@ -222,15 +221,15 @@
/**
- * Generates request body.
+ * Generates request body.
+ *
+ * <p>This method must be overwritten by sub-classes that implement
+ * alternative request content input methods
+ * </p>
*
* @return request body as an array of bytes. If the request content
* has not been set, returns <tt>null</null>.
*
- * <P>This method must be overwritten by sub-classes that implement
- * alternative request content input methods
- * </p>
- *
* @since 2.0beta1
*/
protected byte[] generateRequestBody() {
@@ -243,7 +242,7 @@
if (i > 0) {
buff.append("&");
}
- NameValuePair parameter = (NameValuePair)this.params.get(i);
+ NameValuePair parameter = (NameValuePair) this.params.get(i);
String queryName = null;
try {
queryName = URIUtil.encodeWithinQuery(parameter.getName(), charset);
1.16 +13 -16 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/EntityEnclosingMethod.java
Index: EntityEnclosingMethod.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/EntityEnclosingMethod.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- EntityEnclosingMethod.java 17 Apr 2003 11:34:19 -0000 1.15
+++ EntityEnclosingMethod.java 19 Apr 2003 22:29:32 -0000 1.16
@@ -195,17 +195,16 @@
*/
protected boolean hasRequestContent() {
LOG.trace("enter EntityEnclosingMethod.hasRequestContent()");
- return (this.buffer != null) ||
- (this.requestStream != null) ||
- (this.requestString != null);
+ return (this.buffer != null)
+ || (this.requestStream != null)
+ || (this.requestString != null);
}
/**
- * Clears request body
+ * Clears request body.
*
- * <P>This method must be overwritten by sub-classes that implement
- * alternative request content input methods
- * </p>
+ * <p>This method must be overwritten by sub-classes that implement
+ * alternative request content input methods.</p>
*
* @since 2.0beta1
*/
@@ -217,16 +216,14 @@
this.contentCache = null;
}
-
/**
* Generates request body.
*
+ * <p>This method must be overwritten by sub-classes that implement
+ * alternative request content input methods.</p>
+ *
* @return request body as an array of bytes. If the request content
* has not been set, returns <tt>null</null>.
- *
- * <P>This method must be overwritten by sub-classes that implement
- * alternative request content input methods
- * </p>
*
* @since 2.0beta1
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org