summaryrefslogtreecommitdiff
path: root/dbaccess/qa
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-10-05 09:59:17 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-10-05 09:59:17 +0200
commit2f3ab612d3da3594a90416d3a274347e648874fd (patch)
tree625d95d95f0c7748ed21ec78df90a248a57910e3 /dbaccess/qa
parent11fb383f4d40fafad034662f01108ed04485489b (diff)
parent8c6072dc841612a1b0957069d36b592de8eae5fd (diff)
Automated merge with ssh://hg@hg.services.openoffice.org/cws/sb123
Diffstat (limited to 'dbaccess/qa')
-rw-r--r--dbaccess/qa/complex/dbaccess/DataSource.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/dbaccess/qa/complex/dbaccess/DataSource.java b/dbaccess/qa/complex/dbaccess/DataSource.java
index ce1e6db28e99..e8f8f7a41d77 100644
--- a/dbaccess/qa/complex/dbaccess/DataSource.java
+++ b/dbaccess/qa/complex/dbaccess/DataSource.java
@@ -26,6 +26,7 @@
************************************************************************/
package complex.dbaccess;
+import com.sun.star.container.XNameAccess;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
@@ -110,6 +111,9 @@ public class DataSource extends TestCase
dataSourceName = "someDataSource";
final XNamingService dataSourceRegistrations = (XNamingService) UnoRuntime.queryInterface(
XNamingService.class, getMSF().createInstance("com.sun.star.sdb.DatabaseContext"));
+ final XNameAccess existenceCheck = UnoRuntime.queryInterface( XNameAccess.class, dataSourceRegistrations );
+ if ( existenceCheck.hasByName( "someDataSource" ) )
+ dataSourceRegistrations.revokeObject( "someDataSource" );
dataSourceRegistrations.registerObject("someDataSource", m_dataSource.getXDataSource());
assertEquals("registration name of a newly registered data source is wrong", dataSourceName, m_dataSource.getName());
}