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 | 1ee9a801197f752a9a303af90fb59102a6d9c0e9 (patch) | |
tree | eacfcc0a4b1ddcb7fbf1a7f773ec3cdd7c833fab /connectivity/com/sun | |
parent | d68701c161f7cc60bc1989749c5452b5206bac55 (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')
-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 ecc6c771996c..c574818ad1e0 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 |