commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sung-Gu" <jeri...@apache.org>
Subject Philasophy of URI? - Re: cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestURI.java
Date Tue, 22 Jul 2003 16:10:11 GMT

I think you should not deprecate previous constructors.
And actually no reason to be deprecated as I see.


And about String boolean constructors,
1. JUST CONVENIENCE:
that's ok though... you'd better clear up some comments on the top of the class usage as I
see.


2. FOR REVOLUTION: 
when you're not gonna distiguish empty and undefiled components of URI,
you should modify the all URI documents related that... 
uri string sequences and internal escpaed sequence are distinguished internally...
That's why char and String type is distiguished in the class... 
java.net.URL and java.net.URI are restricted to implment that... 


Sung-Gu


----- Original Message ----- 
From: <olegk@apache.org>


>        /**
>         * Construct a URI as an escaped form of a character array with the given
>   @@ -164,6 +201,8 @@
>         * @throws URIException If the URI cannot be created.
>         * @throws NullPointerException if <code>escaped</code> is <code>null</code>
>         * @see #getProtocolCharset
>   +     * 
>   +     * @deprecated Use #URI(String, boolean, String)
>         */
>        public URI(char[] escaped, String charset) 
>            throws URIException, NullPointerException {
>   @@ -181,6 +220,8 @@
>         * @throws URIException If the URI cannot be created.
>         * @throws NullPointerException if <code>escaped</code> is <code>null</code>
>         * @see #getDefaultProtocolCharset
>   +     * 
>   +     * @deprecated Use #URI(String, boolean)
>         */
>        public URI(char[] escaped) 
>            throws URIException, NullPointerException {
>   @@ -196,6 +237,8 @@
>         * @param charset the charset string to do escape encoding
>         * @throws URIException If the URI cannot be created.
>         * @see #getProtocolCharset
>   +     * 
>   +     * @deprecated Use #URI(String, boolean, String)
>         */
>        public URI(String original, String charset) throws URIException {
>            protocolCharset = charset;
>   @@ -215,6 +258,8 @@
>         * It is one of absoluteURI and relativeURI.
>         * @throws URIException If the URI cannot be created.
>         * @see #getDefaultProtocolCharset
>   +     * 
>   +     * @deprecated Use #URI(String, boolean)
>         */
>        public URI(String original) throws URIException {
>            parseUriReference(original, false);
>   @@ -412,9 +457,26 @@
>         * @param base the base URI
>         * @param relative the relative URI string
>         * @throws URIException If the new URI cannot be created.
>   +     * 
>   +     * @deprecated Use #URI(URI, String, boolean)
>         */
>        public URI(URI base, String relative) throws URIException {
>            this(base, new URI(relative));
>   +    }
>   +
>   +
>   +    /**
>   +     * Construct a general URI with the given relative URI string.
>   +     *
>   +     * @param base the base URI
>   +     * @param relative the relative URI string
>   +     * @param escaped <tt>true</tt> if URI character sequence is in escaped
form. 
>   +     *                <tt>false</tt> otherwise.
>   +     *  
>   +     * @throws URIException If the new URI cannot be created.
>   +     */
>   +    public URI(URI base, String relative, boolean escaped) throws URIException {
>   +        this(base, new URI(relative, escaped));
>        }

Mime
View raw message