There's a small but significant problem with the file store.
If the file already exists, it throws a RevisionAlreadyExistException.
That's correct, and fine. However, the body of that method is all in a
try/catch block which catches _all_ exceptions (catch(Exception e)). It
then throws a new ServiceAccessException, which the webdav servlet
interprets as an internal server error. Not good.

Instead, we need to explicitly catch RevisionAlreadyExistException and
rethrow it. It's already being thrown by the method and dealt with
appropriately further up the call-stack, so nothing more needs to be
done.

This allows PUT to work from a win2000 'web folders' client, among other
things. Though win2000 still gives an error message after succeeding,
which is weird.

Michael

RCS file:
/home/cvspublic/jakarta-slide/src/stores/slidestore/reference/FileContentStore.java,v
retrieving revision 1.3
diff -u -r1.3 FileContentStore.java
--- FileContentStore.java       2001/01/20 20:08:29     1.3
+++ FileContentStore.java       2001/02/02 03:53:44
@@ -309,6 +309,8 @@
             
         } catch (IOException e) {
             throw new ServiceAccessException(this, e.getMessage());
+        } catch(RevisionAlreadyExistException e) {
+            throw e; // we do NOT want this caught by next clause.
         } catch (Exception e) {
             e.printStackTrace();
             throw new ServiceAccessException(this, e.getMessage());

Reply via email to