Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-333

Malformed if statement in org.apache.derby.impl.drda.Database.getDRDAStatement()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0
    • 10.2.1.6
    • Network Server
    • None

    Description

      Semicolon where it should not be (see the <!-- --> comment):

      protected DRDAStatement getDRDAStatement(String pkgnamcsn)
      throws SQLException
      {
      // Need to get the short version because resultSets have different
      // corelation ids.
      String key = getStmtKey(pkgnamcsn);
      DRDAStatement newStmt = null;

      // If our current statement doesn't match,retrieve the statement
      // and make it current if not null.
      // <!-- Note the semicolon after the if statement -->
      if (currentStatement == null ||
      !key.equals(getStmtKey(currentStatement.getPkgnamcsn())));

      { newStmt = (DRDAStatement) stmtTable.get(key); }

      if (newStmt != null) // don't blow away currentStatement if we can't find this one
      currentStatement = newStmt;
      else
      return null;

      // Set the correct result set.
      currentStatement.setCurrentDrdaResultSet(pkgnamcsn);
      return currentStatement;
      }

      Solution is to remove the semicolon, all that is needed is a committer.

      Attachments

        Activity

          People

            knutanders Knut Anders Hatlen
            acadia_student_01 Philip Wilder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: