diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-12-12 14:50:19 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-12-12 14:50:19 +0000 |
commit | fba6ed5de6591f71f36848c34d4e248578c6a76f (patch) | |
tree | 23c1d0d51b3fd3c67afc1e4c15c6f0334b61acb7 /connectivity/com/sun/star/sdbcx/comp | |
parent | e7b5e73239d400055665c1740c835667691e7b31 (diff) |
INTEGRATION: CWS hsqldb1807 (1.7.204); FILE MERGED
2006/12/04 11:47:39 fs 1.7.204.2: #i71859# wrap IOExceptions in rename/removeElement into FileSystemRuntimeExceptions
2006/11/22 14:47:43 rene 1.7.204.1: #i71859# fix build with hsqldb 1.8.0.6/7
Diffstat (limited to 'connectivity/com/sun/star/sdbcx/comp')
-rw-r--r-- | connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java index 63035b6b87..7d6589ebd8 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java @@ -4,9 +4,9 @@ * * $RCSfile: StorageFileAccess.java,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-09-08 04:55:55 $ + * last change: $Author: kz $ $Date: 2006-12-12 15:50:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -42,6 +42,8 @@ package com.sun.star.sdbcx.comp.hsqldb; import org.hsqldb.lib.FileAccess; import com.sun.star.embed.XStorage; import com.sun.star.lib.util.NativeLibraryLoader; +import org.hsqldb.lib.FileSystemRuntimeException; + /** * * @author oj93728 @@ -80,16 +82,24 @@ public class StorageFileAccess implements org.hsqldb.lib.FileAccess{ return new NativeOutputStreamHelper(key,streamName); } - public void removeElement(java.lang.String filename) throws java.util.NoSuchElementException, java.io.IOException { - if ( isStreamElement(key,filename) ) - removeElement(key,filename); + public void removeElement(java.lang.String filename) throws java.util.NoSuchElementException { + try { + if ( isStreamElement(key,filename) ) + removeElement(key,filename); + } catch (java.io.IOException e) { + throw new FileSystemRuntimeException( e, FileSystemRuntimeException.fileAccessRemoveElementFailed ); + } } - public void renameElement(java.lang.String oldName, java.lang.String newName) throws java.util.NoSuchElementException, java.io.IOException { - if ( isStreamElement(key,oldName) ){ - removeElement(key,newName); - renameElement(key,oldName, newName); - } + public void renameElement(java.lang.String oldName, java.lang.String newName) throws java.util.NoSuchElementException { + try { + if ( isStreamElement(key,oldName) ){ + removeElement(key,newName); + renameElement(key,oldName, newName); + } + } catch (java.io.IOException e) { + throw new FileSystemRuntimeException( e, FileSystemRuntimeException.fileAccessRenameElementFailed ); + } } public class FileSync implements FileAccess.FileSync |