Details

    • Type: Sub-task
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6.1, 2.7.0
    • Fix Version/s: 2.6.3, 2.7.0
    • Labels:
      None
    • Environment:
      Static code review of 2.7.0-M2

      Description

      uk.ac.lancs.e_science.sakaiproject.impl.blogger.persistence.SakaiPersistenceManager (line 513)

      In the following code a statement is created but only closed if the second try block catches an SQL Exception. I would expect one try,catch block in the method with a finally closing the statement.

      private ResultSet executeQuerySQL(String sql, Connection connection) throws PersistenceException{

      Statement statement;
      try

      { statement = connection.createStatement(); }

      catch (SQLException e)

      { throw new PersistenceException(e); }

      try

      { return statement.executeQuery(sql); }

      catch (SQLException e){
      try

      {statement.close();}

      catch (Exception ee) {};
      throw new PersistenceException(e);
      }
      }

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  steve.swinsburg Steve Swinsburg
                  Reporter:
                  a.m.berg@uva.nl Alan Berg
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration