summaryrefslogtreecommitdiff
path: root/connectivity/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-19 16:03:41 +0200
committerNoel Grandin <noel@peralex.com>2015-01-05 08:23:29 +0200
commit43cc8ad33e815522e2b23ac87a4a9c4526cd85c9 (patch)
treeb042266508f8b084bc7bbe9cc57250a971311099 /connectivity/qa
parentcfcbe2e44e33f4a60e70006ff5e1cbb9aa2adceb (diff)
java: remove dead code
found by UCDetector Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
Diffstat (limited to 'connectivity/qa')
-rw-r--r--connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java98
-rw-r--r--connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java2
-rw-r--r--connectivity/qa/connectivity/tools/CsvDatabase.java5
-rw-r--r--connectivity/qa/connectivity/tools/DbaseDatabase.java4
-rw-r--r--connectivity/qa/connectivity/tools/QueryDefinition.java16
-rw-r--r--connectivity/qa/connectivity/tools/sdb/Connection.java7
6 files changed, 0 insertions, 132 deletions
diff --git a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java b/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java
deleted file mode 100644
index 66a252d7ea4c..000000000000
--- a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package complex.connectivity.hsqldb;
-
-import complex.connectivity.HsqlDriverTest;
-import java.sql.*;
-import java.lang.reflect.Method;
-
-
-public class DatabaseMetaData {
-
- private final java.sql.DatabaseMetaData m_xMD;
- private final HsqlDriverTest m_TestCase;
-
- /** Creates a new instance of DatabaseMetaData */
- public DatabaseMetaData(HsqlDriverTest _testCase,java.sql.DatabaseMetaData _xmd) {
- m_TestCase = _testCase;
- m_xMD = _xmd;
- }
-
- protected void assure(String _sText,boolean btest){
- m_TestCase.assurePublic(_sText,btest);
- }
-
- protected void testMethod(String sName,Class<?>[] params,Object[] objParams,int nCount){
- try {
- System.out.println("test method " + sName);
-
- Method aGet = ((Object)m_xMD).getClass().getDeclaredMethod(sName, params);
- if ( aGet != null ){
- ResultSet rs = (ResultSet)aGet.invoke(m_xMD, objParams);
- ResultSetMetaData rsMD = rs.getMetaData();
-
- assure( sName + " returns wrong column count" , rsMD.getColumnCount() == nCount);
- rs.close();
- }
- else
- assure( sName + " returns wrong column count" , false);
- } catch( java.lang.NoSuchMethodException ex ) {
- assure("Method " + sName + " could not be found!",false);
- } catch( java.lang.IllegalAccessException ex ) {
- assure("IllegalAccessException!",false);
- } catch( SQLException ex ) {
- assure("SQLException occurred: " + ex.getMessage() ,false);
- } catch( java.lang.reflect.InvocationTargetException ex ) {
- assure("IllegalAccessException!",false);
- }
- }
-
- public void test() {
-
- try {
- ResultSet rs = m_xMD.getTables(null, null, "TESTCASE", null);
- while (rs.next()) {
- String catalog = rs.getString(1);
- if (rs.wasNull())
- catalog = null;
-
- String schema = rs.getString(2);
- if (rs.wasNull())
- schema = null;
-
- String table = rs.getString(3);
- String type = rs.getString(4);
- System.out.println("Catalog: " + catalog + " Schema: " + schema
- + " Table: " + table + " Type: " + type);
- System.out
- .println("------------------ Columns ------------------");
- ResultSet rsColumns = m_xMD.getColumns(catalog, schema, table,
- "%");
- while (rsColumns.next()) {
- System.out.println("Column: " + rsColumns.getString(4)
- + " Type: " + rsColumns.getInt(5) + " TypeName: "
- + rsColumns.getString(6));
- }
-
- }
- rs.close();
- } catch (Exception e) {
-
- }
- }
-}
diff --git a/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java b/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java
index ba9dcdf06dd8..b2b5944f0fa9 100644
--- a/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java
+++ b/connectivity/qa/complex/connectivity/hsqldb/TestCacheSize.java
@@ -82,7 +82,6 @@ public class TestCacheSize {
// type of the big table {MEMORY | CACHED | TEXT}
private String tableType = "CACHED";
private int cacheScale = 17;
- int cacheSizeScale = 8;
// script format {TEXT, BINARY, COMPRESSED}
private String logType = "TEXT";
@@ -109,7 +108,6 @@ public class TestCacheSize {
private XStatement sStatement;
private XConnection cConnection;
- XDataSource ds;
private XDriver drv;
private com.sun.star.beans.PropertyValue[] info;
diff --git a/connectivity/qa/connectivity/tools/CsvDatabase.java b/connectivity/qa/connectivity/tools/CsvDatabase.java
index b2c3a179325e..abb016c90a7c 100644
--- a/connectivity/qa/connectivity/tools/CsvDatabase.java
+++ b/connectivity/qa/connectivity/tools/CsvDatabase.java
@@ -28,9 +28,4 @@ public class CsvDatabase extends FlatFileDatabase
super( i_orb, "flat" );
}
-
- protected CsvDatabase( final XMultiServiceFactory i_orb, final String i_existingDocumentURL ) throws Exception
- {
- super( i_orb, i_existingDocumentURL, "flat" );
- }
}
diff --git a/connectivity/qa/connectivity/tools/DbaseDatabase.java b/connectivity/qa/connectivity/tools/DbaseDatabase.java
index f3f883144e89..9a1dc844815c 100644
--- a/connectivity/qa/connectivity/tools/DbaseDatabase.java
+++ b/connectivity/qa/connectivity/tools/DbaseDatabase.java
@@ -29,8 +29,4 @@ public class DbaseDatabase extends FlatFileDatabase
}
- protected DbaseDatabase( final XMultiServiceFactory i_orb, final String i_existingDocumentURL ) throws Exception
- {
- super( i_orb, i_existingDocumentURL, "dbase" );
- }
}
diff --git a/connectivity/qa/connectivity/tools/QueryDefinition.java b/connectivity/qa/connectivity/tools/QueryDefinition.java
index b939fdbb22e3..fc3cba3820a8 100644
--- a/connectivity/qa/connectivity/tools/QueryDefinition.java
+++ b/connectivity/qa/connectivity/tools/QueryDefinition.java
@@ -18,11 +18,9 @@
package connectivity.tools;
-import com.sun.star.beans.PropertyVetoException;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.IllegalArgumentException;
public class QueryDefinition
{
@@ -48,18 +46,4 @@ public class QueryDefinition
return command;
}
- /** retrieves the command underlying the query definition
- *
- * This method is a mere wrapped around the <code>getPropertyValue( "Command" )</code> call
- */
- public void setCommand( String _command ) throws WrappedTargetException
- {
- try
- {
- m_queryDef.setPropertyValue( "Command", _command );
- }
- catch (UnknownPropertyException e) { }
- catch (PropertyVetoException e) { }
- catch (IllegalArgumentException e) { }
- }
}
diff --git a/connectivity/qa/connectivity/tools/sdb/Connection.java b/connectivity/qa/connectivity/tools/sdb/Connection.java
index a1617fbf3a95..d713de379264 100644
--- a/connectivity/qa/connectivity/tools/sdb/Connection.java
+++ b/connectivity/qa/connectivity/tools/sdb/Connection.java
@@ -22,7 +22,6 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XSingleSelectQueryComposer;
import com.sun.star.sdbc.SQLException;
import com.sun.star.sdbc.XConnection;
-import com.sun.star.sdbc.XDatabaseMetaData;
import com.sun.star.sdbc.XPreparedStatement;
import com.sun.star.sdbc.XStatement;
import com.sun.star.sdbcx.XTablesSupplier;
@@ -74,12 +73,6 @@ public class Connection
}
public
- XDatabaseMetaData getMetaData() throws SQLException
- {
- return m_connection.getMetaData();
- }
-
- public
void close() throws SQLException
{
m_connection.close();