jericho 2002/10/29 09:00:46 Modified: httpclient/src/java/org/apache/commons/httpclient URI.java Log: - Fix a bug of using a variable used - Add the reason code for exception - minor javadoc changes. Revision Changes Path 1.13 +14 -10 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java Index: URI.java =================================================================== RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- URI.java 29 Oct 2002 16:22:19 -0000 1.12 +++ URI.java 29 Oct 2002 17:00:46 -0000 1.13 @@ -1786,7 +1786,7 @@ if (length >= 2) { char[] lastDelimiter = { tmp.charAt(length - 1) }; if (validate(lastDelimiter, delims)) { - tmp = original.substring(1, length - 1); + tmp = tmp.substring(1, length - 1); length = length - 2; } } @@ -2870,7 +2870,8 @@ */ public void setRawQuery(char[] escapedQuery) throws URIException { if (!validate(escapedQuery, query)) - throw new URIException("escaped query not valid"); + throw new URIException(URIException.ESCAPING, + "escaped query not valid"); _query = escapedQuery; setUriReference(); } @@ -2886,7 +2887,8 @@ public void setEscapedQuery(String escapedQuery) throws URIException { char[] querySequence = escapedQuery.toCharArray(); if (!validate(querySequence, query)) - throw new URIException("escaped query not valid"); + throw new URIException(URIException.ESCAPING, + "escaped query not valid"); _query = querySequence; setUriReference(); } @@ -2950,7 +2952,8 @@ */ public void setRawFragment(char[] escapedFragment) throws URIException { if (!validate(escapedFragment, fragment)) - throw new URIException("escaped fragment not valid"); + throw new URIException(URIException.ESCAPING, + "escaped fragment not valid"); _fragment = escapedFragment; setUriReference(); } @@ -2966,7 +2969,8 @@ public void setEscapedFragment(String escapedFragment) throws URIException { char[] fragmentSequence = escapedFragment.toCharArray(); if (!validate(fragmentSequence, fragment)) - throw new URIException("escaped fragment not valid"); + throw new URIException(URIException.ESCAPING, + "escaped fragment not valid"); _fragment = fragmentSequence; setUriReference(); } @@ -3335,7 +3339,7 @@ * a given locale. Supports all locales recognized in JDK 1.1. * <p> * The distribution of this class is Servlets.com. It was originally - * written by Jason Hunter [jhunter at acm.org] with permission. + * written by Jason Hunter [jhunter at acm.org] and used by with permission. */ public static class LocaleToCharsetMap {
-- To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>