Exception when checking for table presence is not processed correctly

XMLWordPrintable

      What are the steps to reproduce your problem?
      1. Empty H2 database
      2. Something is wrong with database connectivity (not clear how to reproduce)
      3. Start the engine

      What is the problem?
      If in method DbSqlSession.isTablePresent , in "internal" try..catch clause the exception happens, it can then be hidden by another exception coming from finally clause.

      try {
          tables = databaseMetaData.getTables(this.connectionMetadataDefaultCatalog, schema, tableName, JDBC_METADATA_TABLE_TYPES);
          return tables.next();
      } finally {
          tables.close();
      }
      

      What would be the expected behavior:
      The initial exception must be never hidden and must appear in logs

      Hints (optional):
      Null-check is required in finally clause

            Assignee:
            Yana Vasileva
            Reporter:
            Svetlana Dorokhova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: