cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods ExpectContinueMethod.java
olegk 2003/07/26 03:05:32 Modified:httpclient/src/java/org/apache/commons/httpclient/methods ExpectContinueMethod.java Log: Javadocs update for the ExpectContinueMethod class Revision ChangesPath 1.7 +39 -7 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/ExpectContinueMethod.java Index: ExpectContinueMethod.java === RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/ExpectContinueMethod.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ExpectContinueMethod.java 5 Jul 2003 18:43:04 - 1.6 +++ ExpectContinueMethod.java 26 Jul 2003 10:05:31 - 1.7 @@ -78,6 +78,17 @@ * /p * * p + * The purpose of the 100 (Continue) status (refer to section 10.1.1 + * of the RFC 2616 for more details) is to allow a client that is + * sending a request message with a request body to determine if the + * origin server is willing to accept the request (based on the request + * headers) before the client sends the request body. In some cases, + * it might either be inappropriate or highly inefficient for the + * client to send the body if the server will reject the message + * without looking at the body. + * /p + * + * p * 'Expect: 100-continue' handshake should be used with caution, * as it may cause problems with HTTP servers and proxies that * do not support HTTP/1.1 protocol. @@ -118,9 +129,17 @@ } /** - * Returns the useExpectHeader. + * p + * Returns tttrue/tt if the 'Expect: 100-Continue' handshake + * is activated. The purpose of the 'Expect: 100-Continue' + * handshake to allow a client that is sending a request message + * with a request body to determine if the origin server is + * willing to accept the request (based on the request headers) + * before the client sends the request body. + * /p * - * @return boolean + * @return tttrue/tt if 'Expect: 100-Continue' handshake is to + * be used, ttfalse/tt otherwise. * * @since 2.0beta1 */ @@ -129,7 +148,20 @@ } /** - * Sets the useExpectHeader. + * p + * Activates 'Expect: 100-Continue' handshake. The purpose of + * the 'Expect: 100-Continue' handshake to allow a client that is + * sending a request message with a request body to determine if + * the origin server is willing to accept the request (based on + * the request headers) before the client sends the request body. + * /p + * + * p + * The use of the 'Expect: 100-continue' handshake can result in + * noticable peformance improvement for entity enclosing requests + * (such as POST and PUT) that require the target server's + * authentication. + * /p * * p * 'Expect: 100-continue' handshake should be used with @@ -137,7 +169,7 @@ * proxies that do not support HTTP/1.1 protocol. * /p * - * @param value The useExpectHeader to set + * @param value boolean value * * * @since 2.0beta1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods ExpectContinueMethod.java
olegk 2003/07/26 03:07:09 Modified:httpclient/src/java/org/apache/commons/httpclient/methods Tag: HTTPCLIENT_2_0_BRANCH ExpectContinueMethod.java Log: Javadocs update for the ExpectContinueMethod class Revision ChangesPath No revision No revision 1.5.2.1 +39 -7 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/ExpectContinueMethod.java Index: ExpectContinueMethod.java === RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/ExpectContinueMethod.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- ExpectContinueMethod.java 6 Apr 2003 22:31:54 - 1.5 +++ ExpectContinueMethod.java 26 Jul 2003 10:07:09 - 1.5.2.1 @@ -77,6 +77,17 @@ * /p * * p + * The purpose of the 100 (Continue) status (refer to section 10.1.1 + * of the RFC 2616 for more details) is to allow a client that is + * sending a request message with a request body to determine if the + * origin server is willing to accept the request (based on the request + * headers) before the client sends the request body. In some cases, + * it might either be inappropriate or highly inefficient for the + * client to send the body if the server will reject the message + * without looking at the body. + * /p + * + * p * 'Expect: 100-continue' handshake should be used with caution, * as it may cause problems with HTTP servers and proxies that * do not support HTTP/1.1 protocol. @@ -144,9 +155,17 @@ } /** - * Returns the useExpectHeader. + * p + * Returns tttrue/tt if the 'Expect: 100-Continue' handshake + * is activated. The purpose of the 'Expect: 100-Continue' + * handshake to allow a client that is sending a request message + * with a request body to determine if the origin server is + * willing to accept the request (based on the request headers) + * before the client sends the request body. + * /p * - * @return boolean + * @return tttrue/tt if 'Expect: 100-Continue' handshake is to + * be used, ttfalse/tt otherwise. * * @since 2.0beta1 */ @@ -155,7 +174,20 @@ } /** - * Sets the useExpectHeader. + * p + * Activates 'Expect: 100-Continue' handshake. The purpose of + * the 'Expect: 100-Continue' handshake to allow a client that is + * sending a request message with a request body to determine if + * the origin server is willing to accept the request (based on + * the request headers) before the client sends the request body. + * /p + * + * p + * The use of the 'Expect: 100-continue' handshake can result in + * noticable peformance improvement for entity enclosing requests + * (such as POST and PUT) that require the target server's + * authentication. + * /p * * p * 'Expect: 100-continue' handshake should be used with @@ -163,7 +195,7 @@ * proxies that do not support HTTP/1.1 protocol. * /p * - * @param value The useExpectHeader to set + * @param value boolean value * * * @since 2.0beta1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang StringEscapeUtils.java RandomStringUtils.java
scolebourne2003/07/26 03:32:18 Modified:lang/src/java/org/apache/commons/lang StringEscapeUtils.java RandomStringUtils.java Log: Fix Javadoc troubles from Phil Steitz Revision ChangesPath 1.20 +2 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/StringEscapeUtils.java Index: StringEscapeUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringEscapeUtils.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- StringEscapeUtils.java25 Jul 2003 23:06:58 - 1.19 +++ StringEscapeUtils.java26 Jul 2003 10:32:17 - 1.20 @@ -71,6 +71,7 @@ * @author Helge Tesgaard * @author a href=[EMAIL PROTECTED]Sean Brown/a * @author a href=mailto:[EMAIL PROTECTED]Gary Gregory/a + * @author Phil Steitz * @since 2.0 * @version $Id$ */ @@ -446,7 +447,6 @@ * @param str the codeString/code to escape, may be null * @return a new escaped codeString/code, codenull/code if null string input * - * @see Entities * @see #unescapeHtml(String) * @see /bra href=http://hotwired.lycos.com/webmonkey/reference/special_characters/;ISO Entities/a * @see /bra href=http://www.w3.org/TR/REC-html32#latin1;HTML 3.2 Character Entities for ISO Latin-1/a 1.19 +9 -8 jakarta-commons/lang/src/java/org/apache/commons/lang/RandomStringUtils.java Index: RandomStringUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/RandomStringUtils.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- RandomStringUtils.java26 Jul 2003 00:26:32 - 1.18 +++ RandomStringUtils.java26 Jul 2003 10:32:17 - 1.19 @@ -200,7 +200,7 @@ * pThis method has exactly the same semantics as * [EMAIL PROTECTED] #random(int,int,int,boolean,boolean,char[],Random)}, but * instead of using an externally supplied source of randomness, it uses - * the internal static [EMAIL PROTECTED] Random} instance ([EMAIL PROTECTED] #RANDOM})./p + * the internal static [EMAIL PROTECTED] Random} instance./p * * @param count the length of random string to create * @param start the position in set of chars to start at @@ -221,19 +221,20 @@ * pCreates a random string based on a variety of options, using * supplied source of randomness./p * - * pIf start and end are both code0/code, start and end are set + * pIf start and end are both code0/code, start and end are set * to code' '/code and code'z'/code, the ASCII printable * characters, will be used, unless letters and numbers are both - * codefalse/code, in which case, start and end are set to + * codefalse/code, in which case, start and end are set to * code0/code and codeInteger.MAX_VALUE/code. * - * pIf set is not codenull/code, characters between start and + * pIf set is not codenull/code, characters between start and * end are chosen./p * - * pAs a source of randomness is used supplied [EMAIL PROTECTED] Random} - * instance. This makes method behave predictively, and allows - * usage of codeRandomStringUtils/code in situations that need - * repetitive behaviour./p + * pThis method accepts a user-supplied [EMAIL PROTECTED] Random} + * instance to use as a source of randomness. By seeding a single + * [EMAIL PROTECTED] Random} instance with a fixed seed and using it for each call, + * the same random sequence of strings can be generated repeatedly + * and predictably./p * * @param count the length of random string to create * @param start the position in set of chars to start at - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/exception Nestable.java
scolebourne2003/07/26 06:00:36 Modified:lang/src/java/org/apache/commons/lang/exception Nestable.java Log: Javadoc improvements Revision ChangesPath 1.7 +6 -5 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/Nestable.java Index: Nestable.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/Nestable.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Nestable.java 23 Mar 2003 17:47:51 - 1.6 +++ Nestable.java 26 Jul 2003 13:00:36 - 1.7 @@ -169,8 +169,8 @@ /** * Prints the stack trace of this exception to the specified print - * writer. Includes inforamation from the exception--if - * any--which caused this exception. + * writer. Includes information from the exception, if any, + * which caused this exception. * * @param out codePrintWriter/code to use for output. */ @@ -178,8 +178,8 @@ /** * Prints the stack trace of this exception to the specified print - * stream. Includes inforamation from the exception--if - * any--which caused this exception. + * stream. Includes inforamation from the exception, if any, + * which caused this exception. * * @param out codePrintStream/code to use for output. */ @@ -196,4 +196,5 @@ * @param out The writer to use. */ public void printPartialStackTrace(PrintWriter out); + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/exception NestableDelegate.java ExceptionUtils.java
scolebourne2003/07/26 06:05:22 Modified:lang/src/java/org/apache/commons/lang/exception NestableDelegate.java ExceptionUtils.java Log: Update null handling in ExceptionUtils Revision ChangesPath 1.17 +17 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/NestableDelegate.java Index: NestableDelegate.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/NestableDelegate.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- NestableDelegate.java 25 Jul 2003 23:05:22 - 1.16 +++ NestableDelegate.java 26 Jul 2003 13:05:21 - 1.17 @@ -99,11 +99,13 @@ /** * Whether to print the stack trace top-down. + * This public flag may be set by calling code, typically in initialisation. */ public static boolean topDown = true; /** * Whether to trim the repeated stack trace. + * This public flag may be set by calling code, typically in initialisation. */ public static boolean trimStackFrames = true; @@ -253,7 +255,20 @@ * chain */ public int indexOfThrowable(Class type, int fromIndex) { -return ExceptionUtils.indexOfThrowable(this.nestable, type, fromIndex); +if (fromIndex 0) { +throw new IndexOutOfBoundsException(The start index was out of bounds: + fromIndex); +} +Throwable[] throwables = ExceptionUtils.getThrowables(this.nestable); +if (fromIndex = throwables.length) { +throw new IndexOutOfBoundsException(The start index was out of bounds: ++ fromIndex + = + throwables.length); +} +for (int i = fromIndex; i throwables.length; i++) { +if (throwables[i].getClass().equals(type)) { +return i; +} +} +return -1; } /** 1.29 +261 -158 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/ExceptionUtils.java Index: ExceptionUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/ExceptionUtils.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ExceptionUtils.java 26 Jul 2003 00:43:08 - 1.28 +++ ExceptionUtils.java 26 Jul 2003 13:05:21 - 1.29 @@ -67,6 +67,7 @@ import java.util.StringTokenizer; import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.NullArgumentException; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; @@ -92,8 +93,7 @@ static final String WRAPPED_MARKER = [wrapped] ; /** - * pThe names of methods commonly used to access a wrapped - * exception./p + * pThe names of methods commonly used to access a wrapped exception./p */ private static String[] CAUSE_METHOD_NAMES = { getCause, @@ -107,12 +107,27 @@ }; /** - * pConstructs a new codeExceptionUtils/code. Protected to - * discourage instantiation./p + * pThe Method object for JDK1.4 getCause./p */ -protected ExceptionUtils() { +private static final Method THROWABLE_CAUSE_METHOD; +static { +Method getCauseMethod; +try { +getCauseMethod = Throwable.class.getMethod(getCause, null); +} catch (Exception e) { +getCauseMethod = null; +} +THROWABLE_CAUSE_METHOD = getCauseMethod; +} + +/** + * pPublic constructor allows an instance of codeExceptionUtils/code + * to be created, although that is not normally necessary./p + */ +public ExceptionUtils() { } +//--- /** * pAdds to the list of method names used in the search for codeThrowable/code * objects./p @@ -121,7 +136,7 @@ * and empty strings are ignored */ public static void addCauseMethodName(String methodName) { - if(StringUtils.isNotEmpty(methodName)) { +if (StringUtils.isNotEmpty(methodName)) { List list = new ArrayList(Arrays.asList(CAUSE_METHOD_NAMES)); list.add(methodName); CAUSE_METHOD_NAMES = (String[]) list.toArray(new String[list.size()]); @@ -129,7 +144,7 @@ } /** - * pIntrospects the specified codeThrowable/code to obtain the cause./p + * pIntrospects the codeThrowable/code to obtain the cause./p * * pThe method searches for methods with specific names that return
cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/exception ExceptionUtilsTestCase.java
scolebourne2003/07/26 06:11:22 Modified:lang/src/test/org/apache/commons/lang/exception ExceptionUtilsTestCase.java Log: Update null handling in ExceptionUtils Revision ChangesPath 1.9 +237 -66 jakarta-commons/lang/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java Index: ExceptionUtilsTestCase.java === RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ExceptionUtilsTestCase.java 23 Mar 2003 17:36:16 - 1.8 +++ ExceptionUtilsTestCase.java 26 Jul 2003 13:11:21 - 1.9 @@ -53,8 +53,14 @@ */ package org.apache.commons.lang.exception; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; +import java.lang.reflect.InvocationTargetException; +import java.sql.SQLException; + +import org.apache.commons.lang.SystemUtils; import junit.framework.Test; import junit.framework.TestSuite; @@ -63,121 +69,287 @@ * Tests [EMAIL PROTECTED] org.apache.commons.lang.exception.ExceptionUtils}. * * @author a href=mailto:[EMAIL PROTECTED]Daniel Rall/a - * @aithor a href=mailto:[EMAIL PROTECTED]Steven Caswell/a + * @author a href=mailto:[EMAIL PROTECTED]Steven Caswell/a + * @author Stephen Colebourne * @since 1.0 */ -public class ExceptionUtilsTestCase extends junit.framework.TestCase -{ +public class ExceptionUtilsTestCase extends junit.framework.TestCase { + private NestableException nested; private Throwable withCause; private Throwable withoutCause; -public ExceptionUtilsTestCase(String name) -{ +public ExceptionUtilsTestCase(String name) { super(name); } - -public static Test suite() -{ + +public static Test suite() { return new TestSuite(ExceptionUtilsTestCase.class); } -public void setUp() -{ +public void setUp() { withoutCause = createExceptionWithoutCause(); nested = new NestableException(withoutCause); withCause = new ExceptionWithCause(nested); } - -private Throwable createExceptionWithoutCause(){ + +//--- +private Throwable createExceptionWithoutCause() { try { throw new ExceptionWithoutCause(); -} -catch (Throwable t){ +} catch (Throwable t) { return t; } } -private Throwable createExceptionWithCause(){ +private Throwable createExceptionWithCause() { try { try { throw new ExceptionWithCause(createExceptionWithoutCause()); -} -catch (Throwable t){ +} catch (Throwable t) { throw new ExceptionWithCause(t); } -} -catch (Throwable t){ +} catch (Throwable t) { return t; } -} - -public void testGetCause() -{ -assertNull(ExceptionUtils.getCause(withoutCause)); -assertTrue(ExceptionUtils.getCause(nested) == withoutCause); -assertTrue(ExceptionUtils.getCause(withCause) == nested); } -public void testGetRootCause() -{ -assertNull(ExceptionUtils.getRootCause(withoutCause)); -assertTrue(ExceptionUtils.getRootCause(withCause) == withoutCause); -assertTrue(ExceptionUtils.getRootCause(withCause) == withoutCause); +//--- +public void testGetCause_Throwable() { +assertSame(null, ExceptionUtils.getCause(null)); +assertSame(null, ExceptionUtils.getCause(withoutCause)); +assertSame(withoutCause, ExceptionUtils.getCause(nested)); +assertSame(nested, ExceptionUtils.getCause(withCause)); +} + +public void testGetCause_ThrowableArray() { +assertSame(null, ExceptionUtils.getCause(null, null)); +assertSame(null, ExceptionUtils.getCause(null, new String[0])); + +// match because known type +assertSame(withoutCause, ExceptionUtils.getCause(nested, null)); +assertSame(withoutCause, ExceptionUtils.getCause(nested, new String[0])); +assertSame(withoutCause, ExceptionUtils.getCause(nested, new String[] {getCause})); + +// not known type, so match on supplied method names +assertSame(nested, ExceptionUtils.getCause(withCause, null)); // default names +assertSame(null,
DO NOT REPLY [Bug 21819] - [lang] javadoc fixes (remove @links to non-public identifiers)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21819. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21819 [lang] javadoc fixes (remove @links to non-public identifiers) [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-07-26 13:21 --- Patch applied, thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21819] - [lang] javadoc fixes (remove @links to non-public identifiers)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21819. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21819 [lang] javadoc fixes (remove @links to non-public identifiers) [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang project.properties
scolebourne2003/07/26 06:21:44 Modified:lang project.properties Log: Comment out checkstyle to allow for maven-beta10 bug 21809 Revision ChangesPath 1.3 +2 -1 jakarta-commons/lang/project.properties Index: project.properties === RCS file: /home/cvs/jakarta-commons/lang/project.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- project.properties2 Feb 2003 09:16:32 - 1.2 +++ project.properties26 Jul 2003 13:21:44 - 1.3 @@ -1,2 +1,3 @@ -maven.checkstyle.properties=checkstyle.properties +#line below commented out to keep maven-b10 people happy +#maven.checkstyle.properties=checkstyle.properties maven.xdoc.date = left - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21809] - [lang] maven-beta10 checkstyle problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21809. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21809 [lang] maven-beta10 checkstyle problem [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-07-26 13:24 --- Applied. sarcasmNice to see maven makes life easier for project management./sarcasm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21809] - [lang] maven-beta10 checkstyle problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21809. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21809 [lang] maven-beta10 checkstyle problem [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/httpclient/xdocs downloads.xml news.xml releases.xml status.xml
olegk 2003/07/26 07:07:35 Modified:httpclient/src/java/org/apache/commons/httpclient Tag: HTTPCLIENT_2_0_BRANCH HttpMethodBase.java httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH downloads.xml news.xml releases.xml status.xml Log: Release Candidate 1 documentation site update Contributed by Oleg Kalnichevski Revision ChangesPath No revision No revision 1.159.2.5 +6 -6 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java Index: HttpMethodBase.java === RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v retrieving revision 1.159.2.4 retrieving revision 1.159.2.5 diff -u -r1.159.2.4 -r1.159.2.5 --- HttpMethodBase.java 15 Jul 2003 12:56:33 - 1.159.2.4 +++ HttpMethodBase.java 26 Jul 2003 14:07:34 - 1.159.2.5 @@ -130,7 +130,7 @@ * @author a href=mailto:[EMAIL PROTECTED]dIon Gillard/a * @author a href=mailto:[EMAIL PROTECTED]Jeff Dever/a * @author a href=mailto:[EMAIL PROTECTED]Davanum Srinivas/a - * @author Ortwin Glück + * @author Ortwin Glück * @author Eric Johnson * @author Michael Becke * @author a href=mailto:[EMAIL PROTECTED]Oleg Kalnichevski/a @@ -155,7 +155,7 @@ static { String agent = System.getProperties() .getProperty(httpclient.useragent, - Jakarta Commons-HttpClient/2.0beta2); + Jakarta Commons-HttpClient/2.0rc1); USER_AGENT = new Header(User-Agent, agent); } No revision No revision 1.19.2.1 +6 -4 jakarta-commons/httpclient/xdocs/downloads.xml Index: downloads.xml === RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/downloads.xml,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -u -r1.19 -r1.19.2.1 --- downloads.xml 2 Jul 2003 01:28:50 - 1.19 +++ downloads.xml 26 Jul 2003 14:07:35 - 1.19.2.1 @@ -17,16 +17,18 @@ /p ul lia href=http://jakarta.apache.org/builds/jakarta-commons/release/commons-httpclient/v2.0/; - Release 2.0 Beta 2/a - 2 June 2003/li + Release 2.0 Release Candidate 1/a - 28 July 2003/li /ul p Nightly source drops can be obtained a href=http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-httpclient/;here/a. + Please note that nightly drops may no longer be 2.0 API compatible. /p p The latest a href=http://jakarta.apache.org/gump/;Gump/a generated binary can be obtained a href=http://gump.covalent.net/jars/latest/jakarta-commons/;here/a. - /p + Please note that nightly drops may no longer be 2.0 API compatible. + /p p The CVS repository for emHttpClient/em can be a href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;browsed online/a. @@ -36,7 +38,7 @@ a href=http://jakarta.apache.org/site/cvsindex.html;CVS server/a. /p p - If you are using Maven for your project, you can create a dependancy in your + If you are using Maven for your project, you can create a dependency in your project.xml with the following block: pre lt;dependencygt; 1.20.2.1 +9 -1 jakarta-commons/httpclient/xdocs/news.xml Index: news.xml === RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/news.xml,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -u -r1.20 -r1.20.2.1 --- news.xml 2 Jul 2003 01:28:50 - 1.20 +++ news.xml 26 Jul 2003 14:07:35 - 1.20.2.1 @@ -11,6 +11,14 @@ body +section name=28 July 2003 - HttpClient 2.0 Release Candidate 1 released + pWith this release the emHttpClient 2.0 BETA/em development phase has been +concluded. The number of bugs discovered in the course of the BETA development +has been surprisingly low. We are growing confident that emHttpClient +2.0/em has reached the required level of maturity, and we hope to have a final 2.0 +release by the end of the Summer or the mid Autumn the latest./p +/section + section name=02 July 2003 - HttpClient 2.0 Beta 2 released pThis release contains some minor bug fixes and documentation enhancements. Most likely this will be the final beta release before 2.0
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/exception ExceptionUtils.java
scolebourne2003/07/26 07:22:21 Modified:lang/src/java/org/apache/commons/lang/exception ExceptionUtils.java Log: Fix bug in isNestedThrowable, shown on JDK1.4 Revision ChangesPath 1.30 +2 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/ExceptionUtils.java Index: ExceptionUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/ExceptionUtils.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- ExceptionUtils.java 26 Jul 2003 13:05:21 - 1.29 +++ ExceptionUtils.java 26 Jul 2003 14:22:21 - 1.30 @@ -354,7 +354,7 @@ for (int i = 0, isize = CAUSE_METHOD_NAMES.length; i isize; i++) { try { Method method = cls.getMethod(CAUSE_METHOD_NAMES[i], null); -if (method != null) { +if (method != null Throwable.class.isAssignableFrom(method.getReturnType())) { return true; } } catch (NoSuchMethodException ignored) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/httpclient build.xml project.xml release_notes.txt
olegk 2003/07/26 07:25:41 Modified:httpclient Tag: HTTPCLIENT_2_0_BRANCH build.xml project.xml release_notes.txt Log: Release Candidate 1 build scripts update Contributed by Oleg Kalnichevski Revision ChangesPath No revision No revision 1.29.2.1 +2 -2 jakarta-commons/httpclient/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-commons/httpclient/build.xml,v retrieving revision 1.29 retrieving revision 1.29.2.1 diff -u -r1.29 -r1.29.2.1 --- build.xml 2 Jul 2003 01:28:49 - 1.29 +++ build.xml 26 Jul 2003 14:25:41 - 1.29.2.1 @@ -37,7 +37,7 @@ property name=component.title value=HttpClient Library/ !-- The current version number of this component -- - property name=component.version value=2.0-beta2/ + property name=component.version value=2.0-rc1/ !-- == Properties: Source Directories -- 1.35.2.1 +8 -3 jakarta-commons/httpclient/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v retrieving revision 1.35 retrieving revision 1.35.2.1 diff -u -r1.35 -r1.35.2.1 --- project.xml 5 Jul 2003 16:47:30 - 1.35 +++ project.xml 26 Jul 2003 14:25:41 - 1.35.2.1 @@ -6,7 +6,7 @@ idcommons-httpclient/id gumpRepositoryIdjakarta-commons-httpclient/gumpRepositoryId inceptionYear2001/inceptionYear - currentVersion2.0-beta2/currentVersion + currentVersion2.0-rc1/currentVersion packageorg.apache.commons.httpclient/package organization @@ -35,6 +35,11 @@ versions version + idrc1/id + name2.0-rc1/name + tagHTTPCLIENT_2_0_RC1/tag +/version +version idb2/id name2.0-beta2/name tagHTTPCLIENT_2_0_BETA2/tag @@ -112,7 +117,7 @@ /roles /developer developer - nameOrtwin Glück/name + nameOrtwin Glück/name idoglueck/id email[EMAIL PROTECTED]/email organizationNose Applied Intelligence AG/organization @@ -168,7 +173,7 @@ contributors contributor - nameArmando Ant�n/name + nameArmando Antï¿Ån/name email[EMAIL PROTECTED]/email /contributor contributor 1.9.2.1 +11 -0 jakarta-commons/httpclient/release_notes.txt Index: release_notes.txt === RCS file: /home/cvs/jakarta-commons/httpclient/release_notes.txt,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- release_notes.txt 2 Jul 2003 01:28:49 - 1.9 +++ release_notes.txt 26 Jul 2003 14:25:41 - 1.9.2.1 @@ -1,3 +1,14 @@ +Release 2.0 Release Candidate 2 +--- +Changes since Release 2.0 Beta 2: + + * 21532 - Removed use of sun.* class in URI.java + + * 20481 - Changed query param encoding to UTF-8. + + * 21378 - Multiple transfer encoding headers are now handled properly. Non chunked transfer + encodings are now handled correctly. + Release 2.0 Beta 2 --- Changes since Release 2.0 Beta 1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang StringUtils.java
scolebourne2003/07/26 07:34:50 Modified:lang/src/java/org/apache/commons/lang StringUtils.java Log: Handle JDK1.2/JDK1.3 bug in String.indexOf Revision ChangesPath 1.80 +6 -1 jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java Index: StringUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- StringUtils.java 25 Jul 2003 22:22:30 - 1.79 +++ StringUtils.java 26 Jul 2003 14:34:49 - 1.80 @@ -822,6 +822,7 @@ * StringUtils.indexOf(aabaabaa, b, 9) = -1 * StringUtils.indexOf(aabaabaa, b, -1) = 2 * StringUtils.indexOf(aabaabaa, , 2) = 2 + * StringUtils.indexOf(abc, , 9)= 3 * /pre * * @param str the String to check, may be null @@ -833,6 +834,10 @@ public static int indexOf(String str, String searchStr, int startPos) { if (str == null || searchStr == null) { return -1; +} +// JDK1.2/JDK1.3 have a bug, when startPos str.length for , hence +if (searchStr.length() == 0 startPos = str.length()) { +return str.length(); } return str.indexOf(searchStr, startPos); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/exception NestableDelegateTestCase.java
scolebourne2003/07/26 07:36:00 Modified:lang/src/test/org/apache/commons/lang/exception NestableDelegateTestCase.java Log: Comment out unreliable test based on stack trace Revision ChangesPath 1.6 +4 -3 jakarta-commons/lang/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java Index: NestableDelegateTestCase.java === RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- NestableDelegateTestCase.java 21 May 2003 23:49:14 - 1.5 +++ NestableDelegateTestCase.java 26 Jul 2003 14:36:00 - 1.6 @@ -573,8 +573,9 @@ int actCount = countLines(stack1); assertTrue(topDown: +topDown+, trimStackFrames: +trimStackFrames+ startsWith, stack1.startsWith(startsWith)); -assertEquals(topDown: +topDown+, trimStackFrames: +trimStackFrames+ lineCount, -expCount, actCount); +// test is unreliable, as count varies depending on JUnit version/where main method is +//assertEquals(topDown: +topDown+, trimStackFrames: +trimStackFrames+ lineCount, +//expCount, actCount); } private int countLines(String s) { if (s == null) return 0; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21904] - NumberUtils.createBigDecimal() NPE in Sun 1.3.1_08
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904 NumberUtils.createBigDecimal() NPE in Sun 1.3.1_08 --- Additional Comments From [EMAIL PROTECTED] 2003-07-26 15:48 --- I agree with Phil's comments, and option 4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 21758] - [lang] lang.builder classes javadoc edits (mostly typo fixes)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21758. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21758 [lang] lang.builder classes javadoc edits (mostly typo fixes) [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[lang] The private field StringEscapeUtils.DEFAULT_ENTITIES is never read locally
The private field StringEscapeUtils.DEFAULT_ENTITIES is never read locally. Should it be deleted? Do we plan on using it? Gary
DO NOT REPLY [Bug 21904] - NumberUtils.createBigDecimal() NPE in Sun 1.3.1_08
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904 NumberUtils.createBigDecimal() NPE in Sun 1.3.1_08 --- Additional Comments From [EMAIL PROTECTED] 2003-07-26 18:46 --- I have added tests for locally and run against 1.4.2, 1.3.1_08 and 1.2_2_016 and found that all tests (including ) give expected results with current code in all cases with the one exception of createBigDecimal on 1.3.1_08. I see this as a JDK bug. Therefore I think that my option (4) is overkill, introducing a needless function call and string search for each activation to handle an isolated JDK bug. I would recommend option (5), possibly applied only to createBigDecimal (i.e. leave the other methods alone). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[lang] StringEscapeUtils method names
We currently have names such as escapeHtml escapeXml I believe that the Sun guidelines are escapeHTML escapeXML etc. Should we change them? Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/math NumberUtils.java
ggregory2003/07/26 12:12:04 Modified:lang/src/java/org/apache/commons/lang/math NumberUtils.java Log: Fix http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904 as suggested (but with the guard clause factored in a method.) Revision ChangesPath 1.7 +31 -11 jakarta-commons/lang/src/java/org/apache/commons/lang/math/NumberUtils.java Index: NumberUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/NumberUtils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- NumberUtils.java 26 Jul 2003 15:39:04 - 1.6 +++ NumberUtils.java 26 Jul 2003 19:12:03 - 1.7 @@ -57,6 +57,7 @@ import java.math.BigInteger; import org.apache.commons.lang.NullArgumentException; +import org.apache.commons.lang.StringUtils; /** * pProvides extra functionality for Java Number classes./p @@ -68,6 +69,7 @@ * @author Eric Pugh * @author Phil Steitz * @author Matthew Hawthorne + * @author a href=mailto:[EMAIL PROTECTED]Gary Gregory/a * @since 2.0 * @version $Id$ */ @@ -216,12 +218,9 @@ * @throws NumberFormatException if the value cannot be converted */ public static Number createNumber(String str) throws NumberFormatException { -if (str == null) { +if (!validateNumber(str)) { return null; } -if (str.length() == 0) { -throw new NumberFormatException(\\ is not a valid number.); -} if (str.startsWith(--)) { // this is protection for poorness in java.lang.BigDecimal. // it accepts this as a legal value, but it does not appear @@ -389,7 +388,7 @@ * @throws NumberFormatException if the value cannot be converted */ public static Float createFloat(String str) { -if (str == null) { +if (!validateNumber(str)) { return null; } return Float.valueOf(str); @@ -405,7 +404,7 @@ * @throws NumberFormatException if the value cannot be converted */ public static Double createDouble(String str) { -if (str == null) { +if (!validateNumber(str)) { return null; } return Double.valueOf(str); @@ -423,7 +422,7 @@ */ public static Integer createInteger(String str) { // decode() handles 0xAABD and 0777 (hex and octal) as well. -if (str == null) { +if (!validateNumber(str)) { return null; } return Integer.decode(str); @@ -439,7 +438,7 @@ * @throws NumberFormatException if the value cannot be converted */ public static Long createLong(String str) { -if (str == null) { +if (!validateNumber(str)) { return null; } return Long.valueOf(str); @@ -455,7 +454,7 @@ * @throws NumberFormatException if the value cannot be converted */ public static BigInteger createBigInteger(String str) { -if (str == null) { +if (!validateNumber(str)) { return null; } return new BigInteger(str); @@ -471,12 +470,33 @@ * @throws NumberFormatException if the value cannot be converted */ public static BigDecimal createBigDecimal(String str) { -if (str == null) { +if (!validateNumber(str)) { return null; } return new BigDecimal(str); } +/** + * Checks the validitiy of a codeString/code for conversion it to a number. + * ol + * liIf codestr/code is codenull/code, return codefalse/code;/li + * liIf codestr/code is iblank/i, throw a codeNumberFormatException/code;/li + * liOtherewise return codetrue/code./li + * /ol + * + * @param str The codeString/code to check. + * @return Whether or not the argument is suitable for conversion. + */ +protected static boolean validateNumber(String str) { +if (str == null) { +return false; +} +if (StringUtils.isBlank(str)) { +throw new NumberFormatException(A blank string is not a valid number.); +} +return true; +} + // Min in array // /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/math NumberUtilsTest.java
ggregory2003/07/26 12:12:30 Modified:lang/src/test/org/apache/commons/lang/math NumberUtilsTest.java Log: Fix http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904 as suggested (but with the guard clause factored in a method.) Revision ChangesPath 1.5 +62 -13 jakarta-commons/lang/src/test/org/apache/commons/lang/math/NumberUtilsTest.java Index: NumberUtilsTest.java === RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/NumberUtilsTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- NumberUtilsTest.java 21 Jul 2003 19:42:12 - 1.4 +++ NumberUtilsTest.java 26 Jul 2003 19:12:30 - 1.5 @@ -72,6 +72,7 @@ * @author Phil Steitz * @author Stephen Colebourne * @author Matthew Hawthorne + * @author a href=mailto:[EMAIL PROTECTED]Gary Gregory/a * @version $Id$ */ public class NumberUtilsTest extends TestCase { @@ -150,9 +151,17 @@ public void testCreateFloat() { assertEquals(createFloat(String) failed, new Float(1234.5), NumberUtils.createFloat(1234.5)); assertEquals(createFloat(null) failed, null, NumberUtils.createFloat(null)); +this.testCreateFloatFailure(); +this.testCreateFloatFailure( ); +this.testCreateFloatFailure(\b\t\n\f\r); +// Funky whitespaces + this.testCreateFloatFailure(\u00A0\uFEFF\u000B\u000C\u001C\u001D\u001E\u001F); +} + +protected void testCreateFloatFailure(String str) { try { -Float f = NumberUtils.createFloat(); -fail(createFloat(empty) failed); +Float value = NumberUtils.createFloat(str); +fail(createFloat(blank) failed: + value); } catch (NumberFormatException ex) { // empty } @@ -161,9 +170,17 @@ public void testCreateDouble() { assertEquals(createDouble(String) failed, new Double(1234.5), NumberUtils.createDouble(1234.5)); assertEquals(createDouble(null) failed, null, NumberUtils.createDouble(null)); +this.testCreateDoubleFailure(); +this.testCreateDoubleFailure( ); +this.testCreateDoubleFailure(\b\t\n\f\r); +// Funky whitespaces + this.testCreateDoubleFailure(\u00A0\uFEFF\u000B\u000C\u001C\u001D\u001E\u001F); +} + +protected void testCreateDoubleFailure(String str) { try { -Double d = NumberUtils.createDouble(); -fail(createDouble(empty) failed); +Double value = NumberUtils.createDouble(str); +fail(createDouble(blank) failed: + value); } catch (NumberFormatException ex) { // empty } @@ -172,9 +189,17 @@ public void testCreateInteger() { assertEquals(createInteger(String) failed, new Integer(12345), NumberUtils.createInteger(12345)); assertEquals(createInteger(null) failed, null, NumberUtils.createInteger(null)); +this.testCreateIntegerFailure(); +this.testCreateIntegerFailure( ); +this.testCreateIntegerFailure(\b\t\n\f\r); +// Funky whitespaces + this.testCreateIntegerFailure(\u00A0\uFEFF\u000B\u000C\u001C\u001D\u001E\u001F); +} + +protected void testCreateIntegerFailure(String str) { try { -Integer i = NumberUtils.createInteger(); -fail(createInteger(empty) failed); +Integer value = NumberUtils.createInteger(str); +fail(createInteger(blank) failed: + value); } catch (NumberFormatException ex) { // empty } @@ -183,9 +208,17 @@ public void testCreateLong() { assertEquals(createLong(String) failed, new Long(12345), NumberUtils.createLong(12345)); assertEquals(createLong(null) failed, null, NumberUtils.createLong(null)); +this.testCreateLongFailure(); +this.testCreateLongFailure( ); +this.testCreateLongFailure(\b\t\n\f\r); +// Funky whitespaces + this.testCreateLongFailure(\u00A0\uFEFF\u000B\u000C\u001C\u001D\u001E\u001F); +} + +protected void testCreateLongFailure(String str) { try { -Long l = NumberUtils.createLong(); -fail(createLong(empty) failed); +Long value = NumberUtils.createLong(str); +fail(createLong(blank) failed: + value); } catch (NumberFormatException ex) { // empty } @@ -194,9 +227,17 @@ public void testCreateBigInteger() { assertEquals(createBigInteger(String) failed, new BigInteger(12345), NumberUtils.createBigInteger(12345)); assertEquals(createBigInteger(null) failed, null,
DO NOT REPLY [Bug 21904] - NumberUtils.createBigDecimal() NPE in Sun 1.3.1_08
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21904 NumberUtils.createBigDecimal() NPE in Sun 1.3.1_08 --- Additional Comments From [EMAIL PROTECTED] 2003-07-26 23:41 --- Created an attachment (id=7530) NumberUtils patch fixing only createBigDecimal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance Issue
I think I tell the reason even without having seen the code. Since beta-1 'expect: 100-continue' handshake is off per default, that can make a huge difference in terms of performance with POST requests that require authentication. Just do the following httppost.setUseExpectHeader(true); http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/ExpectContinueMethod.html Alternatively you could use preemptive authentication. I hope this helps Cheers Oleg On Sat, 2003-07-26 at 05:35, Todd Wolff wrote: Hi, After upgrading from 2.0-alpha3 to 2.0-beta2, instead of roughly 10 requests per second, I am averaging only 3 requests per second. I was hoping someone could take a look at the attached code and show me the 'error of my ways.' My test is multithreaded, and all requests are sent to the same host. I am setting MaxConnectionsPerHost equivalent to the number of sending threads. The auth-method required by the server is BASIC. Thanks for your help. Todd __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Commons-HttpClient conflict with WebDAVClient
Daniel, Sorry I didn't respond sooner, but I was on vacation. I'm hoping you've gotten an answer on the Slide mailing list, but I've not had a chance to check. I've been doing some work to keep the latest code in Slide up-to-date with the latest of HttpClient 2.0. You should have success there. There is a bunch of interest in the Slide webdavclient, using the latest of HttpClient 2.0 branch, so it should be relatively easy to work with. There is currently a patch outstanding which should help matters somewhat, as well. The Slide folks tend to be a lot less responsive then the excellent group here at HttpClient, so it may not be as smooth as you like. -Eric. Daniel Joshua wrote: Thanks. You will have a lot more luck asking these questions on the slide mailing list since they've actually looked at the code in the past year. :) I have joined posted on the Slide list... so far the list is quiet, guess it is a low traffic mailing list. Regards, Daniel -Original Message- From: Adrian Sutton [mailto:[EMAIL PROTECTED] Sent: Thursday, 24 July, 2003 4:47 PM To: Commons HttpClient Project Subject: Re: Commons-HttpClient conflict with WebDAVClient On Thursday, July 24, 2003, at 06:02 PM, Daniel Joshua wrote: Yes actually, but it's a bit of a nasty hack that was done before slide was actually updated to HttpClient 2.0 (there were a lot of API changes between 1.0 and 2.0). before slide was actually updated? so now the latest WebDAVClient has which version of HttpClient ? eg. HttpClient 2.0 beta 1 or 2 ? I have no idea, I do know that it was updated in the past few months and they were planning to keep it in sync with HttpClient releases. I'd suggest you download the slide source code, rip out the HttpClient classes then compile your own jar against whatever version you like (beta 2 would be my recommendation). You may need to tweak a few things in Slide, but most likely it will just work. You will have a lot more luck asking these questions on the slide mailing list since they've actually looked at the code in the past year. :) Regards, Daniel Regards, Adrian Sutton. -- Intencha tomorrow's technology today Ph: 38478913 0422236329 Suite 8/29 Oatland Crescent Holland Park West 4121 Australia QLD www.intencha.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance Issue
Thanks for the reply Oleg. I tried setUseExpectHeader(true) as suggested, but no improvement. I ran the exact same test with all else held equal except the httpclient libs used (alpha3 vs. beta2) and I've attached the debug logs. I've also attached the code. (No security constraint was used this time, so authorization shouldn't have anything to do with it.) I've been looking at this all day and can't see the reason for the difference. Also, although unrelated to the relative decrease in performance, I did notice that in both tests a new connection is created per request. Is there anything I can do to encourage re-use? Gracias, Todd - Original Message - From: Oleg Kalnichevski [EMAIL PROTECTED] To: Commons HttpClient Project [EMAIL PROTECTED] Sent: Saturday, July 26, 2003 1:48 AM Subject: Re: Performance Issue I think I tell the reason even without having seen the code. Since beta-1 'expect: 100-continue' handshake is off per default, that can make a huge difference in terms of performance with POST requests that require authentication. Just do the following httppost.setUseExpectHeader(true); http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/http client/methods/ExpectContinueMethod.html Alternatively you could use preemptive authentication. I hope this helps Cheers Oleg On Sat, 2003-07-26 at 05:35, Todd Wolff wrote: Hi, After upgrading from 2.0-alpha3 to 2.0-beta2, instead of roughly 10 requests per second, I am averaging only 3 requests per second. I was hoping someone could take a look at the attached code and show me the 'error of my ways.' My test is multithreaded, and all requests are sent to the same host. I am setting MaxConnectionsPerHost equivalent to the number of sending threads. The auth-method required by the server is BASIC. Thanks for your help. Todd __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] import java.util.Properties; import javax.servlet.http.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*; import org.apache.commons.logging.Log; import com.bluestem.alakai.common.exception.AIException; import com.bluestem.alakai.common.util.Logger; public class XmlHTTPClient { private static Log log = Logger.getLog(XmlHTTPClient.class); private Properties props = null; private String strURL = null; private int timeout = 30; //five minute default private String userName = null; private String password = null; private boolean authenticationRequired; private boolean handleAuthentication; private int connections = 5; // default to 5 private HttpClient httpClient = null; public XmlHTTPClient(Properties props) { this.props = props; } public synchronized void start() throws AIException { Logger.debug(log, start begin); parseProps(); MultiThreadedHttpConnectionManager mthcm = new MultiThreadedHttpConnectionManager(); mthcm.setMaxConnectionsPerHost(connections); httpClient = new HttpClient(mthcm); httpClient.setTimeout(timeout); if (authenticationRequired) { httpClient.getState().setCredentials( null, new UsernamePasswordCredentials(userName, password) ); // send the authentication before the challenge is received httpClient.getState().setAuthenticationPreemptive(true); } Logger.debug(log, started with the following parameters: + \n + strURL + strURL + \n + timeout + timeout + \n + userName + userName + \n + password + password + \n + handleAuthentication + handleAuthentication + \n + pooledConnections + connections ); } public String sendMessage(String requestBody) throws AIException { Logger.debug(log, sending request); String xmlResponse = null; PostMethod httppost = null; try { // create the postmethod using the url passed into constructor httppost = new PostMethod(strURL); // Tell the post method to automatically handle authentication. The method will use // any appropriate credentials to handle basic authentication requests. Setting this // value to false will cause any request for authentication to return with a status // of 401. It will then be up to the