Hi Oliver,

could you please test these fixes. I must admit that I don't even know
how to compile this part of the testsuite. Is there an Ant target for
that?

Regards,
Ingo

> ib          2004/02/13 03:47:43
> 
>   Modified:    
> testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor
>                         UpdateAssert.java TProcessors.java
>                         StreamResponseBodyAssert.java PropfindAssert.java
>   Log:
>   Fixes for usage of deprecated/removed client code
>   
>   Revision  Changes    Path
>   1.5       +7 -7      
> jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/UpdateAssert.java
>   
>   Index: UpdateAssert.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/UpdateAssert.java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- UpdateAssert.java       27 Nov 2002 13:47:02 -0000      1.4
>   +++ UpdateAssert.java       13 Feb 2004 11:47:43 -0000      1.5
>   @@ -67,7 +67,7 @@
>    // Slide
>    import java.util.List;
>    import org.apache.slide.testsuite.testtools.tutil.XConf;
>   -import org.apache.util.URLUtil;
>   +import org.apache.commons.httpclient.util.URIUtil;
>    import org.apache.webdav.lib.methods.XMLResponseMethodBase;
>    import org.jdom.Element;
>    
>   @@ -125,8 +125,8 @@
>                if (value2.startsWith("/")){
>                    value2 = value2.substring(1,value2.length());
>                }
>   -            try {value1 = URLUtil.URLDecode(value1, "UTF-8");} catch (Exception 
> e) { }
>   -            try {value2 = URLUtil.URLDecode(value2, "UTF-8");} catch (Exception 
> e) { }
>   +            try {value1 = URIUtil.decode(value1, "UTF-8");} catch (Exception e) { 
> }
>   +            try {value2 = URIUtil.decode(value2, "UTF-8");} catch (Exception e) { 
> }
>            }
>            return super.compareValues(path, name, value1, value2);
>        }
>   
>   
>   
>   1.79      +14 -15    
> jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java
>   
>   Index: TProcessors.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java,v
>   retrieving revision 1.78
>   retrieving revision 1.79
>   diff -u -r1.78 -r1.79
>   --- TProcessors.java        10 Feb 2004 10:12:32 -0000      1.78
>   +++ TProcessors.java        13 Feb 2004 11:47:43 -0000      1.79
>   @@ -91,9 +91,13 @@
>    import org.apache.commons.httpclient.HttpClient;
>    import org.apache.commons.httpclient.HttpMethod;
>    import org.apache.commons.httpclient.UsernamePasswordCredentials;
>   +import org.apache.commons.httpclient.methods.GetMethod;
>   +import org.apache.commons.httpclient.methods.HeadMethod;
>   +import org.apache.commons.httpclient.methods.PostMethod;
>   +import org.apache.commons.httpclient.methods.PutMethod;
>   +import org.apache.commons.httpclient.util.URIUtil;
>    import org.apache.slide.testsuite.testtools.tutil.TArgs;
>    import org.apache.slide.testsuite.testtools.tutil.XConf;
>   -import org.apache.util.URLUtil;
>    import org.apache.util.WebdavStatus;
>    import org.apache.webdav.lib.WebdavState;
>    import org.apache.webdav.lib.methods.AclMethod;
>   @@ -102,8 +106,6 @@
>    import org.apache.webdav.lib.methods.CheckoutMethod;
>    import org.apache.webdav.lib.methods.CopyMethod;
>    import org.apache.webdav.lib.methods.DeleteMethod;
>   -import org.apache.webdav.lib.methods.GetMethod;
>   -import org.apache.webdav.lib.methods.HeadMethod;
>    import org.apache.webdav.lib.methods.HttpRequestBodyMethodBase;
>    import org.apache.webdav.lib.methods.LabelMethod;
>    import org.apache.webdav.lib.methods.LockMethod;
>   @@ -111,10 +113,8 @@
>    import org.apache.webdav.lib.methods.MkcolMethod;
>    import org.apache.webdav.lib.methods.MoveMethod;
>    import org.apache.webdav.lib.methods.OptionsMethod;
>   -import org.apache.webdav.lib.methods.PostMethod;
>    import org.apache.webdav.lib.methods.PropFindMethod;
>    import org.apache.webdav.lib.methods.PropPatchMethod;
>   -import org.apache.webdav.lib.methods.PutMethod;
>    import org.apache.webdav.lib.methods.RebindMethod;
>    import org.apache.webdav.lib.methods.ReportMethod;
>    import org.apache.webdav.lib.methods.SearchMethod;
>   @@ -609,8 +609,8 @@
>                    return false;
>                }
>                xmlresult.writeElement("method", method.getName());
>   -            xmlresult.writeElement("url", 
> URLUtil.URLEncode(method.getPath(),"UTF-8"));
>   -            method.setRequestHeader("User-Agent", "Jakarta Slide TProcessor " + 
> URLUtil.URLEncode(globalTestFileName,"UTF-8"));
>   +            xmlresult.writeElement("url", 
> URIUtil.encodePath(method.getPath(),"UTF-8"));
>   +            method.setRequestHeader("User-Agent", "Jakarta Slide TProcessor " + 
> URIUtil.encodePath(globalTestFileName,"UTF-8"));
>                
>                final int MAX = 50;
>                int i;
>   @@ -945,7 +945,7 @@
>            String name  = headerToSet.getName();
>            String value = headerToSet.getValue();
>            if (name.equalsIgnoreCase("destination")) {
>   -            value = URLUtil.URLEncode(value, "utf-8");
>   +            value = URIUtil.encodePath(value, "utf-8");
>            }
>            
>            method.setRequestHeader(name, value);
>   @@ -1389,7 +1389,7 @@
>                Element e = rootElement;
>                if (key.equals("href")) {
>                    e = (Element)e.clone();
>   -                e.setText(URLUtil.URLDecode(e.getText(), defaultUrlEncoding));
>   +                e.setText(URIUtil.decode(e.getText(), defaultUrlEncoding));
>                }
>                result.add(e);
>                return result;
>   @@ -1545,7 +1545,6 @@
>            }
>            else if(methodName.equalsIgnoreCase("GET")){
>                result = new GetMethod();
>   -            ((GetMethod)result).setUseDisk(false);
>            }
>            else if(methodName.equalsIgnoreCase("HEAD")){
>                result = new HeadMethod();
>   @@ -1625,7 +1624,7 @@
>        public static HttpMethod createHttpMethod(String methodName, String path) 
> throws IOException {
>            HttpMethod result = createHttpMethod(methodName);
>            if (result != null){
>   -            result.setPath(URLUtil.URLEncode(path, "utf-8"));
>   +            result.setPath(URIUtil.encodePath(path, "utf-8"));
>            }
>            return result;
>        }
>   
>   
>   
>   1.11      +4 -5      
> jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/StreamResponseBodyAssert.java
>   
>   Index: StreamResponseBodyAssert.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/StreamResponseBodyAssert.java,v
>   retrieving revision 1.10
>   retrieving revision 1.11
>   diff -u -r1.10 -r1.11
>   --- StreamResponseBodyAssert.java   16 Dec 2002 15:48:29 -0000      1.10
>   +++ StreamResponseBodyAssert.java   13 Feb 2004 11:47:43 -0000      1.11
>   @@ -69,7 +69,6 @@
>    import java.util.List;
>    import org.apache.commons.httpclient.HttpMethod;
>    import org.apache.slide.testsuite.testtools.tutil.XConf;
>   -import org.apache.webdav.lib.methods.GetMethod;
>    
>    
>    
>   
>   
>   
>   1.10      +7 -7      
> jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/PropfindAssert.java
>   
>   Index: PropfindAssert.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/PropfindAssert.java,v
>   retrieving revision 1.9
>   retrieving revision 1.10
>   diff -u -r1.9 -r1.10
>   --- PropfindAssert.java     27 Nov 2002 13:47:02 -0000      1.9
>   +++ PropfindAssert.java     13 Feb 2004 11:47:43 -0000      1.10
>   @@ -67,7 +67,7 @@
>    // Slide
>    import java.util.List;
>    import org.apache.slide.testsuite.testtools.tutil.XConf;
>   -import org.apache.util.URLUtil;
>   +import org.apache.commons.httpclient.util.URIUtil;
>    import org.apache.webdav.lib.methods.XMLResponseMethodBase;
>    import org.jdom.Element;
>    
>   @@ -102,8 +102,8 @@
>                if (value2.startsWith("/")){
>                    value2 = value2.substring(1,value2.length());
>                }
>   -            try {value1 = URLUtil.URLDecode(value1, "UTF-8");} catch (Exception 
> e) { }
>   -            try {value2 = URLUtil.URLDecode(value2, "UTF-8");} catch (Exception 
> e) { }
>   +            try {value1 = URIUtil.decode(value1, "UTF-8");} catch (Exception e) { 
> }
>   +            try {value2 = URIUtil.decode(value2, "UTF-8");} catch (Exception e) { 
> }
>            }
>            return super.compareValues(path, name, value1, value2);
>        }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to