Hi,

When i replace httpclient and slide jar with newest versions (2.0alpha3 and cvs snapshot of slide) I found that in file DavFileSystem.java exception catch must be reordered becouse now HttpException extends IOException

I attach required patch

Sylwester

Index: DavFileSystem.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/fs/dav/DavFileSystem.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 DavFileSystem.java
--- DavFileSystem.java  1 Mar 2003 06:56:08 -0000       1.1.1.1
+++ DavFileSystem.java  13 Mar 2003 17:53:28 -0000
@@ -184,12 +184,12 @@
                 log.error("WebDav root collection doesn't exist: " + root.getPath());
                 throw new FileSystemException("WebDav root collection doesn't exist: 
" + root.getPath());
             }
-        } catch (IOException ioe) {
-            log.error("connect failed", ioe);
-            throw new FileSystemException("connect failed", ioe);
         } catch (HttpException he) {
             log.error("connect failed", he);
             throw new FileSystemException("connect failed", he);
+        } catch (IOException ioe) {
+            log.error("connect failed", ioe);
+            throw new FileSystemException("connect failed", ioe);
         }
     }
 
@@ -211,12 +211,12 @@
                 log.error("copy " + srcPath + " to " + destPath + " failed: " + 
src.getStatusMessage());
                 throw new FileSystemException("copy " + srcPath + " to " + destPath + 
" failed: " + src.getStatusMessage());
             }
-        } catch (IOException ioe) {
-            log.error("copy " + srcPath + " to " + destPath + " failed", ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("copy " + srcPath + " to " + destPath + " failed", he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("copy " + srcPath + " to " + destPath + " failed", ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -230,12 +230,12 @@
                 log.error("failed to create folder " + folderPath + ": " + 
r.getStatusMessage());
                 throw new FileSystemException("failed to create folder " + folderPath 
+ ": " + r.getStatusMessage());
             }
-        } catch (IOException ioe) {
-            log.error("failed to create folder " + folderPath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("failed to create folder " + folderPath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("failed to create folder " + folderPath, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -253,12 +253,12 @@
                 log.error("delete " + filePath + " failed: " + r.getStatusMessage());
                 throw new FileSystemException("delete " + filePath + " failed: " + 
r.getStatusMessage());
             }
-        } catch (IOException ioe) {
-            log.error("delete " + filePath + " failed", ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("delete " + filePath + " failed", he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("delete " + filePath + " failed", ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -276,12 +276,12 @@
                 log.error("delete " + folderPath + " failed: " + 
r.getStatusMessage());
                 throw new FileSystemException("delete " + folderPath + " failed: " + 
r.getStatusMessage());
             }
-        } catch (IOException ioe) {
-            log.error("delete " + folderPath + " failed", ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("delete " + folderPath + " failed", he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("delete " + folderPath + " failed", ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -292,12 +292,12 @@
         try {
             WebdavResource r = getResource(path);
             return r.exists();
-        } catch (IOException ioe) {
-            log.error("checking existence of " + path + " failed", ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("checking existence of " + path + " failed", he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("checking existence of " + path + " failed", ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -312,12 +312,12 @@
                 throw new FileSystemException(filePath + " is not a file");
             }
             return r.getMethodData();
-        } catch (IOException ioe) {
-            log.error("getInputStream() failed for " + filePath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("getInputStream() failed for " + filePath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("getInputStream() failed for " + filePath, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -336,12 +336,12 @@
                 throw new FileSystemException(filePath + " is lcoked");
             }
             return new DavResourceOutputStream(r);
-        } catch (IOException ioe) {
-            log.error("getOutputStream() failed for " + filePath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("getOutputStream() failed for " + filePath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("getOutputStream() failed for " + filePath, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -355,12 +355,12 @@
                 return false;
             }
             return (r.list().length > 0);
-        } catch (IOException ioe) {
-            log.error("list() failed for " + path, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("list() failed for " + path, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("list() failed for " + path, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -371,12 +371,12 @@
         try {
             WebdavResource r = getResource(path);
             return !r.isCollection();
-        } catch (IOException ioe) {
-            log.error("isCollection() failed for " + path, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("isCollection() failed for " + path, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("isCollection() failed for " + path, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -387,12 +387,12 @@
         try {
             WebdavResource r = getResource(path);
             return r.isCollection();
-        } catch (IOException ioe) {
-            log.error("isCollection() failed for " + path, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("isCollection() failed for " + path, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("isCollection() failed for " + path, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -403,12 +403,12 @@
         try {
             WebdavResource r = getResource(path);
             return r.getGetLastModified();
-        } catch (IOException ioe) {
-            log.error("getGetLastModified() failed for " + path, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("getGetLastModified() failed for " + path, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("getGetLastModified() failed for " + path, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -419,12 +419,12 @@
         try {
             WebdavResource r = getResource(filePath);
             return r.getGetContentLength();
-        } catch (IOException ioe) {
-            log.error("getGetContentLength() failed for " + filePath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("getGetContentLength() failed for " + filePath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("getGetContentLength() failed for " + filePath, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -435,12 +435,12 @@
         try {
             WebdavResource r = getResource(folderPath);
             return r.list();
-        } catch (IOException ioe) {
-            log.error("list() failed for " + folderPath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("list() failed for " + folderPath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("list() failed for " + folderPath, ioe);
+            throw new FileSystemException(ioe);
         }
     }
 
@@ -458,12 +458,12 @@
                     files.add(c.getHttpURL().getName());
                 }
             }
-        } catch (IOException ioe) {
-            log.error("listFiles() failed for " + folderPath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("listFiles() failed for " + folderPath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("listFiles() failed for " + folderPath, ioe);
+            throw new FileSystemException(ioe);
         }
         String[] results = new String[files.size()];
         return (String[]) files.toArray(results);
@@ -483,12 +483,12 @@
                     dirs.add(c.getHttpURL().getName());
                 }
             }
-        } catch (IOException ioe) {
-            log.error("listFolders() failed for " + folderPath, ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("listFolders() failed for " + folderPath, he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("listFolders() failed for " + folderPath, ioe);
+            throw new FileSystemException(ioe);
         }
         String[] results = new String[dirs.size()];
         return (String[]) dirs.toArray(results);
@@ -512,12 +512,12 @@
                 log.error("move " + srcPath + " to " + destPath + " failed: " + 
src.getStatusMessage());
                 throw new FileSystemException("move " + srcPath + " to " + destPath + 
" failed: " + src.getStatusMessage());
             }
-        } catch (IOException ioe) {
-            log.error("move " + srcPath + " to " + destPath + " failed", ioe);
-            throw new FileSystemException(ioe);
         } catch (HttpException he) {
             log.error("move " + srcPath + " to " + destPath + " failed", he);
             throw new FileSystemException(he);
+        } catch (IOException ioe) {
+            log.error("move " + srcPath + " to " + destPath + " failed", ioe);
+            throw new FileSystemException(ioe);
         }
     }
 }

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

Reply via email to