#vulnerable code 
                              public List<String> getPartitionColumns(String schema, String table) throws SQLException {
    if (!syntax.doesSupportTablePartitioning()) {
      throw new SQLException("Database does not support table partitioning");
    }
    if (!partitionCache.isEmpty()){
      return partitionCache;
    }
    DbmsQueryResult queryResult = connection.executeQuery(syntax.getPartitionCommand(schema, table));
    JdbcResultSet jdbcQueryResult = new JdbcResultSet(queryResult);
    while (queryResult.next()) {
      partitionCache.add(jdbcQueryResult.getString(0));
    }
    return partitionCache;
  } 
                            #location 6 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              public List<String> getPartitionColumns(String schema, String table) throws SQLException {
    if (!syntax.doesSupportTablePartitioning()) {
      throw new SQLException("Database does not support table partitioning");
    }
    if (!partitionCache.isEmpty()){
      return partitionCache;
    }
    partitionCache.addAll(getPartitionColumns(schema, table));
    return partitionCache;
  }