You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by bp...@apache.org on 2012/07/01 19:27:54 UTC

svn commit: r1355959 - /db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java

Author: bpendleton
Date: Sun Jul  1 17:27:54 2012
New Revision: 1355959

URL: http://svn.apache.org/viewvc?rev=1355959&view=rev
Log:
DERBY-5826: Remove unused methods in NetConnectionReply class

This patch was contributed by Mohamed Nufail (nufail56 at gmail dot com)

This change removes several unused methods from the NetConnectionReply
class. Code inspection of the NetConnectionReply class reveals that
the following methods are not used at all:

- verifyConnectReply(int codept)
- readDummyExchangeServerAttributes(Connection connection)
- checkRequiredObjects(boolean receivedFlag, boolean receivedFlag2, boolean receivedFlag3, boolean receivedFlag4, boolean receivedFlag5, boolean receivedFlag6)
- checkRequiredObjects(boolean receivedFlag, boolean receivedFlag2, boolean receivedFlag3, boolean receivedFlag4, boolean receivedFlag5, boolean receivedFlag6, boolean receivedFlag7)

The change also removes the method parseConnectError() which is being used
only by the removed method verifyConnectReply(int codept)

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?rev=1355959&r1=1355958&r2=1355959&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java Sun Jul  1 17:27:54 2012
@@ -57,47 +57,6 @@ public class NetConnectionReply extends 
         agent_.checkForChainBreakingException_();
     }
 
-    void verifyConnectReply(int codept) throws SqlException {
-        if (peekCodePoint() != codept) {
-            parseConnectError();
-            return;
-        }
-        readLengthAndCodePoint();
-        skipBytes();
-
-        if (codept == CodePoint.ACCRDBRM) {
-            int peekCP = peekCodePoint();
-            if (peekCP == Reply.END_OF_SAME_ID_CHAIN) {
-                return;
-            }
-
-            parseTypdefsOrMgrlvlovrs();
-            NetSqlca netSqlca = parseSQLCARD(null);
-            netAgent_.netConnection_.completeSqlca(netSqlca);
-        }
-    }
-
-    void parseConnectError() throws DisconnectException {
-        int peekCP = peekCodePoint();
-        switch (peekCP) {
-        case CodePoint.CMDCHKRM:
-            parseCMDCHKRM();
-            break;
-        case CodePoint.MGRLVLRM:
-            parseMGRLVLRM();
-            break;
-        default:
-            parseCommonError(peekCP);
-        }
-    }
-
-    void readDummyExchangeServerAttributes(Connection connection) throws SqlException {
-        startSameIdChainParse();
-        parseDummyEXCSATreply((NetConnection) connection);
-        endOfSameIdChainData();
-        agent_.checkForChainBreakingException_();
-    }
-
     // NET only entry point
     void readAccessSecurity(Connection connection,
                             int securityMechanism) throws SqlException {
@@ -2814,32 +2773,6 @@ public class NetConnectionReply extends 
         }
     }
 
-    protected void checkRequiredObjects(boolean receivedFlag,
-                                        boolean receivedFlag2,
-                                        boolean receivedFlag3,
-                                        boolean receivedFlag4,
-                                        boolean receivedFlag5,
-                                        boolean receivedFlag6) throws DisconnectException {
-        if (!receivedFlag || !receivedFlag2 || !receivedFlag3 || !receivedFlag4 ||
-                !receivedFlag5 || !receivedFlag6) {
-            doSyntaxrmSemantics(CodePoint.SYNERRCD_REQ_OBJ_NOT_FOUND);
-        }
-
-    }
-
-    protected void checkRequiredObjects(boolean receivedFlag,
-                                        boolean receivedFlag2,
-                                        boolean receivedFlag3,
-                                        boolean receivedFlag4,
-                                        boolean receivedFlag5,
-                                        boolean receivedFlag6,
-                                        boolean receivedFlag7) throws DisconnectException {
-        if (!receivedFlag || !receivedFlag2 || !receivedFlag3 || !receivedFlag4 ||
-                !receivedFlag5 || !receivedFlag6 || !receivedFlag7) {
-            doSyntaxrmSemantics(CodePoint.SYNERRCD_REQ_OBJ_NOT_FOUND);
-        }
-    }
-
     // These methods are "private protected", which is not a recognized java privilege,
     // but means that these methods are private to this class and to subclasses,
     // and should not be used as package-wide friendly methods.