Derby
  1. Derby
  2. DERBY-5826

Remove unused methods in NetConnectionReply class

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10.1.1
    • Component/s: Network Client
    • Labels:
      None

      Description

      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)

      It may be possible to just remove these methods if they are not required.

      1. DERBY-5826.patch
        3 kB
        Mohamed Nufail

        Activity

        Hide
        Mohamed Nufail added a comment -

        Attached a patch. This patch removes the 4 methods mentioned above and the method parseConnectError() which is being used only by the removed method verifyConnectReply(int codept)

        Show
        Mohamed Nufail added a comment - Attached a patch. This patch removes the 4 methods mentioned above and the method parseConnectError() which is being used only by the removed method verifyConnectReply(int codept)
        Hide
        Bryan Pendleton added a comment -

        I'm reviewing this patch.

        I looked at the SVN history for this file
        http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?view=annotate

        to see if there were any clues about these methods.

        The methods identified by this issue appear to have been present since the original submission of NetConnectionReply in 2005, and have not been modified
        since that time, which is a good piece of evidence sugggesting that they are, indeed, unused.

        Show
        Bryan Pendleton added a comment - I'm reviewing this patch. I looked at the SVN history for this file http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?view=annotate to see if there were any clues about these methods. The methods identified by this issue appear to have been present since the original submission of NetConnectionReply in 2005, and have not been modified since that time, which is a good piece of evidence sugggesting that they are, indeed, unused.
        Hide
        Bryan Pendleton added a comment -

        I agree that these methods are not used: I searched the code tree and
        could find no uses of these methods; I did a complete clean build with
        the patch applied with no errors or messages; the derbynet test suite
        passes cleanly with the patch applied.

        I committed the patch to the trunk as revision 1355959.

        Show
        Bryan Pendleton added a comment - I agree that these methods are not used: I searched the code tree and could find no uses of these methods; I did a complete clean build with the patch applied with no errors or messages; the derbynet test suite passes cleanly with the patch applied. I committed the patch to the trunk as revision 1355959.

          People

          • Assignee:
            Mohamed Nufail
            Reporter:
            Mohamed Nufail
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development