commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r510581 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
Date Thu, 22 Feb 2007 16:36:39 GMT
Author: sebb
Date: Thu Feb 22 08:36:38 2007
New Revision: 510581

URL: http://svn.apache.org/viewvc?view=rev&rev=510581
Log:
Use super.clone() to ensure subclass clone() methods work
Make rootPath final

Modified:
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java?view=diff&rev=510581&r1=510580&r2=510581
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
Thu Feb 22 08:36:38 2007
@@ -714,7 +714,7 @@
     /**
      * The root path.
      */
-    protected static char[] rootPath = { '/' };
+    protected static final char[] rootPath = { '/' };
 
     // ---------------------- Generous characters for each component validation
 
@@ -3683,9 +3683,9 @@
      *
      * @return a clone of this instance
      */
-    public synchronized Object clone() {
+    public synchronized Object clone() throws CloneNotSupportedException {
 
-        URI instance = new URI();
+        URI instance = (URI) super.clone();
 
         instance._uri = _uri;
         instance._scheme = _scheme;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message