Permalink
Browse files

style: remove unused code

The is some unused code in the code base that can be removed without
any loss of functionality.

closes #520
  • Loading branch information...
marschall authored and vlsi committed Feb 21, 2016
1 parent 88e39a0 commit f21f1689241920defe9c7beafde12d0b0f318ca0
@@ -497,8 +497,6 @@ public boolean jdbcCompliant() {
return false;
}
static private String[] protocols = {"jdbc", "postgresql"};
/**
* Constructs a new DriverURL, splitting the specified URL into its component parts
*
@@ -26,10 +26,8 @@
private static class SimpleResultHandler implements ResultHandler {
private SQLException error;
private List<byte[][]> tuples;
private final ProtocolConnection protoConnection;
SimpleResultHandler(ProtocolConnection protoConnection) {
this.protoConnection = protoConnection;
SimpleResultHandler() {
}
List<byte[][]> getResults() {
@@ -68,7 +66,7 @@ public void handleCompletion() throws SQLException {
boolean wantResults) throws SQLException {
QueryExecutor executor = protoConnection.getQueryExecutor();
Query query = executor.createSimpleQuery(queryString);
SimpleResultHandler handler = new SimpleResultHandler(protoConnection);
SimpleResultHandler handler = new SimpleResultHandler();
int flags = QueryExecutor.QUERY_ONESHOT | QueryExecutor.QUERY_SUPPRESS_BEGIN;
if (!wantResults) {
@@ -1784,7 +1784,6 @@ protected void processResults(ResultHandler handler, int flags) throws IOExcepti
List<byte[][]> tuples = null;
int len;
int c;
boolean endQuery = false;
@@ -2015,7 +2014,6 @@ protected void processResults(ResultHandler handler, int flags) throws IOExcepti
{
ExecuteRequest executeData = pendingExecuteQueue.removeFirst();
SimpleQuery currentQuery = executeData.query;
Portal currentPortal = executeData.portal;
handler.handleCommandStatus("EMPTY", 0, 0);
if (currentPortal != null) {
@@ -21,20 +21,18 @@
private final PGStream pgStream;
private final String host;
private final String user;
private final String password;
private final String kerberosServerName;
private final Logger logger;
private final boolean useSpnego;
private final GSSCredential clientCredentials;
public GssAction(PGStream pgStream, GSSCredential clientCredentials, String host, String user,
String password, String kerberosServerName, Logger logger, boolean useSpnego) {
String kerberosServerName, Logger logger, boolean useSpnego) {
this.pgStream = pgStream;
this.clientCredentials = clientCredentials;
this.host = host;
this.user = user;
this.password = password;
this.kerberosServerName = kerberosServerName;
this.logger = logger;
this.useSpnego = useSpnego;
@@ -62,7 +62,7 @@ public static void authenticate(PGStream pgStream, String host, String user, Str
sub = lc.getSubject();
}
PrivilegedAction<Exception> action = new GssAction(pgStream, gssCredential, host, user,
password, kerberosServerName, logger, useSpnego);
kerberosServerName, logger, useSpnego);
result = Subject.doAs(sub, action);
} catch (Exception e) {
@@ -32,7 +32,6 @@
protected BaseConnection conn;
private LargeObject currentLo;
private long loPos;
private boolean currentLoIsWriteable;
private boolean support64bit;
@@ -98,8 +98,6 @@
private int fetchdirection = ResultSet.FETCH_UNKNOWN;
protected final BaseConnection connection; // the connection we belong to
protected final BaseStatement statement; // the statement we belong to
private Statement realStatement;
// the real statement we belong to (when using forced binary prepared statement test hack)
protected final Field fields[]; // Field metadata for this resultset.
protected final Query originalQuery; // Query we originated from
@@ -3118,11 +3116,6 @@ void addRows(List<byte[][]> tuples) {
rows.addAll(tuples);
}
public void registerRealStatement(Statement realStatement) {
this.realStatement = realStatement;
}
public void updateRef(int columnIndex, Ref x) throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateRef(int,Ref)");
}
@@ -275,7 +275,6 @@ public void handleCompletion() throws SQLException {
ps.setFetchSize(getFetchSize());
ps.setFetchDirection(getFetchDirection());
PgResultSet rs = (PgResultSet) ps.executeQuery();
rs.registerRealStatement(this);
result = firstUnclosedResult = new ResultWrapper(rs);
return rs;
@@ -59,7 +59,6 @@ public SSPIClient(PGStream pgStream, String spnServiceClass, boolean enableNegot
this.pgStream = pgStream;
/* If blank or unspecified, SPN service class should be POSTGRES */
String realServiceClass = spnServiceClass;
if (spnServiceClass != null && spnServiceClass.isEmpty()) {
spnServiceClass = null;
}
@@ -23,9 +23,6 @@
private UnixCrypt() {
}
private static final char[] saltChars =
("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./".toCharArray());
private static final int ITERATIONS = 16;
private static final int con_salt[] = {

0 comments on commit f21f168

Please sign in to comment.