clean up warnings produced by Eclipse

This commit is contained in:
Barry Lind 2003-05-29 04:39:51 +00:00
parent 35511088d3
commit fb630cc49f
29 changed files with 120 additions and 117 deletions

View File

@ -6,7 +6,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/Driver.java.in,v 1.29 2003/05/29 03:22:48 barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/Driver.java.in,v 1.30 2003/05/29 04:39:51 barry Exp $
*
*-------------------------------------------------------------------------
*/
@ -198,7 +198,8 @@ public class Driver implements java.sql.Driver
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
{
//This method isn't really implemented
Properties p = parseURL(url, info);
//we just parse the URL to ensure it is valid
parseURL(url, info);
return new DriverPropertyInfo[0];
}
@ -261,8 +262,6 @@ public class Driver implements java.sql.Driver
{
int state = -1;
Properties urlProps = new Properties(defaults);
String key = "";
String value = "";
String l_urlServer = url;
String l_urlArgs = "";

View File

@ -6,7 +6,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/fastpath/Attic/Fastpath.java,v 1.13 2003/05/29 03:21:32 barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/fastpath/Attic/Fastpath.java,v 1.14 2003/05/29 04:39:51 barry Exp $
*
*-------------------------------------------------------------------------
*/
@ -225,6 +225,7 @@ public class Fastpath
switch (c)
{
case 'A': // Asynchronous Notify
//TODO: do something with this
int pid = stream.ReceiveInteger(4);
String msg = stream.ReceiveString(conn.getEncoding());
break;

View File

@ -7,18 +7,17 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGcircle.java,v 1.4 2003/03/07 18:39:42 barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGcircle.java,v 1.5 2003/05/29 04:39:48 barry Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.geometric;
import java.io.Serializable;
import java.sql.SQLException;
import java.util.Hashtable;
import org.postgresql.util.PGobject;
import org.postgresql.util.PGtokenizer;
import org.postgresql.util.PSQLException;
import java.io.Serializable;
import java.sql.SQLException;
public class PGcircle extends PGobject implements Serializable, Cloneable
{

View File

@ -6,20 +6,18 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGpoint.java,v 1.4 2003/03/07 18:39:43 barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGpoint.java,v 1.5 2003/05/29 04:39:48 barry Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.geometric;
import java.awt.Point;
import java.io.Serializable;
import java.sql.SQLException;
import org.postgresql.util.PGobject;
import org.postgresql.util.PGtokenizer;
import org.postgresql.util.PSQLException;
import org.postgresql.util.*;
import java.awt.Point;
import java.io.Serializable;
import java.sql.SQLException;
/*
* This implements a version of java.awt.Point, except it uses double

View File

@ -6,17 +6,16 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGpolygon.java,v 1.4 2003/03/07 18:39:43 barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGpolygon.java,v 1.5 2003/05/29 04:39:48 barry Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.geometric;
import java.io.Serializable;
import java.sql.SQLException;
import org.postgresql.util.PGobject;
import org.postgresql.util.PGtokenizer;
import org.postgresql.util.PSQLException;
import java.io.Serializable;
import java.sql.SQLException;
public class PGpolygon extends PGobject implements Serializable, Cloneable
{

View File

@ -250,7 +250,7 @@ public abstract class AbstractJdbc1DatabaseMetaData
*/
public String getDriverVersion() throws SQLException
{
String driverVersion = connection.this_driver.getVersion();
String driverVersion = Driver.getVersion();
if (Driver.logDebug)
Driver.debug("getDriverVersion " + driverVersion);
return driverVersion;
@ -3412,7 +3412,6 @@ public abstract class AbstractJdbc1DatabaseMetaData
{
Field f[] = new Field[18];
ResultSet r; // ResultSet for the SQL query that we need to do
Vector v = new Vector(); // The new ResultSet tuple stuff
f[0] = new Field(connection, "TYPE_NAME", iVarcharOid, getMaxNameLength());

View File

@ -1,12 +1,11 @@
package org.postgresql.jdbc1;
import java.lang.*;
import java.util.*;
import org.postgresql.core.Field;
import org.postgresql.util.*;
import org.postgresql.util.PSQLException;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Vector;
public abstract class AbstractJdbc1ResultSetMetaData
{
@ -180,7 +179,6 @@ public abstract class AbstractJdbc1ResultSetMetaData
{
Field f = getField(column);
String type_name = f.getPGType();
int sql_type = f.getSQLType();
int typmod = f.getMod();
// I looked at other JDBC implementations and couldn't find a consistent

View File

@ -1,19 +1,31 @@
package org.postgresql.jdbc1;
import java.io.*;
import java.math.BigDecimal;
import java.sql.*;
import java.util.Vector;
import org.postgresql.core.BaseConnection;
import org.postgresql.core.BaseResultSet;
import org.postgresql.core.BaseStatement;
import org.postgresql.core.Field;
import org.postgresql.core.QueryExecutor;
import org.postgresql.largeobject.*;
import org.postgresql.util.*;
import org.postgresql.largeobject.LargeObject;
import org.postgresql.largeobject.LargeObjectManager;
import org.postgresql.util.PGbytea;
import org.postgresql.util.PGobject;
import org.postgresql.util.PSQLException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Time;
import java.sql.Timestamp;
import java.sql.Types;
import java.util.Vector;
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.21 2003/05/03 20:40:45 barry Exp $
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.22 2003/05/29 04:39:49 barry Exp $
* This class defines methods of the jdbc1 specification. This class is
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement

View File

@ -1,13 +1,11 @@
package org.postgresql.jdbc2;
import java.lang.*;
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
import java.sql.*;
import org.postgresql.PGConnection;
import org.postgresql.largeobject.*;
import org.postgresql.largeobject.LargeObject;
import org.postgresql.largeobject.LargeObjectManager;
import java.io.InputStream;
import java.sql.Blob;
import java.sql.SQLException;
public abstract class AbstractJdbc2Blob
{

View File

@ -1,14 +1,14 @@
package org.postgresql.jdbc2;
import java.lang.*;
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
import java.sql.*;
import org.postgresql.PGConnection;
import org.postgresql.largeobject.*;
import org.postgresql.largeobject.LargeObject;
import org.postgresql.largeobject.LargeObjectManager;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.sql.Clob;
import java.sql.SQLException;
public class AbstractJdbc2Clob
{

View File

@ -1,12 +1,13 @@
package org.postgresql.jdbc2;
import java.io.*;
import java.net.ConnectException;
import java.sql.*;
import org.postgresql.util.PSQLException;
import java.io.PrintWriter;
import java.sql.DriverManager;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.Types;
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Connection.java,v 1.4 2003/03/07 18:39:44 barry Exp $
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Connection.java,v 1.5 2003/05/29 04:39:48 barry Exp $
* This class defines methods of the jdbc2 specification. This class extends
* org.postgresql.jdbc1.AbstractJdbc1Connection which provides the jdbc1
* methods. The real Connection class (for jdbc2) is org.postgresql.jdbc2.Jdbc2Connection

View File

@ -1,12 +1,6 @@
package org.postgresql.jdbc2;
import org.postgresql.jdbc1.AbstractJdbc1ResultSet;
import java.sql.*;
import java.util.*;
import org.postgresql.Driver;
import org.postgresql.core.Field;
import org.postgresql.util.PSQLException;
import java.sql.SQLException;
public abstract class AbstractJdbc2DatabaseMetaData extends org.postgresql.jdbc1.AbstractJdbc1DatabaseMetaData
{

View File

@ -1,11 +1,11 @@
package org.postgresql.jdbc2;
import java.lang.*;
import java.sql.*;
import java.util.*;
import org.postgresql.core.Field;
import org.postgresql.util.*;
import org.postgresql.util.PSQLException;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Vector;
public abstract class AbstractJdbc2ResultSetMetaData extends org.postgresql.jdbc1.AbstractJdbc1ResultSetMetaData
{
@ -175,7 +175,6 @@ public abstract class AbstractJdbc2ResultSetMetaData extends org.postgresql.jdbc
{
Field f = getField(column);
String type_name = f.getPGType();
int sql_type = f.getSQLType();
int typmod = f.getMod();
// I looked at other JDBC implementations and couldn't find a consistent

View File

@ -1,14 +1,18 @@
package org.postgresql.jdbc2;
import java.text.*;
import java.sql.*;
import java.util.*;
import java.math.BigDecimal;
import org.postgresql.core.BaseConnection;
import org.postgresql.core.BaseResultSet;
import org.postgresql.core.BaseStatement;
import org.postgresql.core.Field;
import org.postgresql.util.*;
import org.postgresql.util.PSQLException;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Map;
import java.util.Vector;
/*
* Array is used collect one column of query result data.
@ -176,7 +180,6 @@ public class Array implements java.sql.Array
break;
case Types.TIMESTAMP:
retVal = new Timestamp[ count ];
StringBuffer sbuf = null;
for ( ; count > 0; count-- )
((java.sql.Timestamp[])retVal)[i++] = AbstractJdbc2ResultSet.toTimestamp( arrayContents[(int)index++], rs, getBaseTypeName() );
break;

View File

@ -1,7 +1,6 @@
package org.postgresql.jdbc2;
import org.postgresql.util.*;
import java.sql.*;
import org.postgresql.util.MessageTranslator;
/*
* This class extends java.sql.BatchUpdateException, and provides our

View File

@ -1,12 +1,9 @@
package org.postgresql.jdbc3;
import java.sql.*;
import java.util.Vector;
import java.util.Hashtable;
import org.postgresql.core.Field;
import java.sql.SQLException;
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/Jdbc3Connection.java,v 1.4 2003/03/07 18:39:45 barry Exp $
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/Jdbc3Connection.java,v 1.5 2003/05/29 04:39:50 barry Exp $
* This class implements the java.sql.Connection interface for JDBC3.
* However most of the implementation is really done in
* org.postgresql.jdbc3.AbstractJdbc3Connection or one of it's parents

View File

@ -1,11 +1,10 @@
package org.postgresql.jdbc3;
import org.postgresql.core.QueryExecutor;
import org.postgresql.core.Field;
import org.postgresql.core.BaseStatement;
import java.util.Vector;
import org.postgresql.PGConnection;
import org.postgresql.PGRefCursorResultSet;
import org.postgresql.core.BaseStatement;
import org.postgresql.core.Field;
import org.postgresql.core.QueryExecutor;
import java.util.Vector;
/** A real result set based on a ref cursor.
*

View File

@ -1,9 +1,13 @@
package org.postgresql.test.jdbc2;
import org.postgresql.test.TestUtil;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import junit.framework.TestCase;
import java.io.*;
import java.sql.*;
/*
* CallableStatement tests.

View File

@ -324,7 +324,7 @@ public class DatabaseMetaDataPropertiesTest extends TestCase
DatabaseMetaData dbmd = con.getMetaData();
assertNotNull(dbmd);
assertTrue(dbmd.getDriverVersion().equals(pc.getDriver().getVersion()));
assertTrue(dbmd.getDriverVersion().equals(org.postgresql.Driver.getVersion()));
assertTrue(dbmd.getDriverMajorVersion() == pc.getDriver().getMajorVersion());
assertTrue(dbmd.getDriverMinorVersion() == pc.getDriver().getMinorVersion());

View File

@ -9,7 +9,7 @@ import java.sql.*;
*
* PS: Do you know how difficult it is to type on a train? ;-)
*
* $Id: DatabaseMetaDataTest.java,v 1.17 2003/03/24 03:48:32 barry Exp $
* $Id: DatabaseMetaDataTest.java,v 1.18 2003/05/29 04:39:48 barry Exp $
*/
public class DatabaseMetaDataTest extends TestCase
@ -337,7 +337,7 @@ public class DatabaseMetaDataTest extends TestCase
{
DatabaseMetaData dbmd = con.getMetaData();
assertNotNull(dbmd);
ResultSet rs = dbmd.getBestRowIdentifier(null,null,"pg_type",dbmd.bestRowSession,false);
ResultSet rs = dbmd.getBestRowIdentifier(null,null,"pg_type",DatabaseMetaData.bestRowSession,false);
rs.close();
} catch (SQLException sqle) {
fail(sqle.getMessage());

View File

@ -1,12 +1,14 @@
package org.postgresql.test.jdbc2;
import org.postgresql.test.TestUtil;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import junit.framework.TestCase;
import java.sql.*;
import java.math.BigDecimal;
/*
* $Id: JBuilderTest.java,v 1.7 2002/09/06 21:23:06 momjian Exp $
* $Id: JBuilderTest.java,v 1.8 2003/05/29 04:39:48 barry Exp $
*
* Some simple tests to check that the required components needed for JBuilder
* stay working
@ -54,7 +56,7 @@ public class JBuilderTest extends TestCase
while (rs.next())
{
double bd = rs.getDouble(1);
rs.getDouble(1);
}
rs.close();

View File

@ -1,11 +1,6 @@
package org.postgresql.test.jdbc2;
import junit.framework.TestSuite;
import junit.framework.TestCase;
import junit.framework.Test;
import java.sql.*;
import java.lang.reflect.Method;
/*
* Executes all known tests for JDBC2 and includes some utility methods.

View File

@ -5,7 +5,7 @@ import junit.framework.TestCase;
import java.sql.*;
/*
* $Id: MiscTest.java,v 1.9 2003/05/29 03:21:32 barry Exp $
* $Id: MiscTest.java,v 1.10 2003/05/29 04:39:48 barry Exp $
*
* Some simple tests based on problems reported by users. Hopefully these will
* help prevent previous problems from re-occuring ;-)
@ -38,7 +38,7 @@ public class MiscTest extends TestCase
while (rs.next())
{
String s = rs.getString(1);
rs.getString(1);
}
rs.close();

View File

@ -1,9 +1,13 @@
package org.postgresql.test.jdbc2;
import org.postgresql.test.TestUtil;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.Types;
import junit.framework.TestCase;
import java.io.*;
import java.sql.*;
/*
* RefCursor ResultSet tests.

View File

@ -1,9 +1,11 @@
package org.postgresql.test.jdbc2;
import org.postgresql.test.TestUtil;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import junit.framework.TestCase;
import java.io.*;
import java.sql.*;
/*
* ResultSet tests.

View File

@ -1,10 +1,13 @@
package org.postgresql.test.jdbc2;
import org.postgresql.test.TestUtil;
import org.postgresql.PGStatement;
import org.postgresql.test.TestUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import junit.framework.TestCase;
import java.io.*;
import java.sql.*;
/*
* Tests for using server side prepared statements

View File

@ -5,7 +5,7 @@ import junit.framework.TestCase;
import java.sql.*;
/*
* $Id: TimestampTest.java,v 1.10 2003/01/14 09:13:51 barry Exp $
* $Id: TimestampTest.java,v 1.11 2003/05/29 04:39:48 barry Exp $
*
* Test get/setTimestamp for both timestamp with time zone and
* timestamp without time zone datatypes
@ -24,8 +24,6 @@ public class TimestampTest extends TestCase
protected void setUp() throws Exception
{
con = TestUtil.openDB();
Statement stmt = con.createStatement();
TestUtil.createTable(con, TSWTZ_TABLE, "ts timestamp with time zone");
TestUtil.createTable(con, TSWOTZ_TABLE, "ts timestamp without time zone");
}

View File

@ -1,17 +1,18 @@
package org.postgresql.test.jdbc3;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.PooledConnection;
import org.postgresql.test.jdbc2.optional.ConnectionPoolTest;
import org.postgresql.jdbc3.Jdbc3ConnectionPool;
import org.postgresql.jdbc3.Jdbc3PooledConnection;
import org.postgresql.test.TestUtil;
import org.postgresql.jdbc3.*;
import org.postgresql.test.jdbc2.optional.ConnectionPoolTest;
import java.sql.SQLException;
import javax.sql.PooledConnection;
/**
* Tests JDBC3 implementation of ConnectionPoolDataSource.
*
* @author Aaron Mulder (ammulder@chariotsolutions.com)
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
public class Jdbc3ConnectionPoolTest extends ConnectionPoolTest
{

View File

@ -6,14 +6,13 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PGtokenizer.java,v 1.6 2003/03/07 18:39:46 barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PGtokenizer.java,v 1.7 2003/05/29 04:39:51 barry Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.util;
import java.sql.*;
import java.util.*;
import java.util.Vector;
/*
* It's mainly used by the geometric classes, but is useful in parsing any