title: Use try-with-resources or close this "PreparedStatement" in a "finally" clause. In Spring JDBC
body: <p>I'm getting the following issue from Sonar:
  SampleDao.java  null    Use try-with-resources or close this "PreparedStatement" in a "finally" clause.</p>
  
  <p>And I'm using Spring JDBC with the following code:</p>
  
  <pre><code>ResponseObject user = jdbcTemplate.query(new PreparedStatementCreator() {
          @Override
          public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
              PreparedStatement ps = con.prepareStatement(MY_QUERY);
              ps.setLong(1, parameter);
              return ps;
          }
      }, new MyResultSetExtractor());
  </code></pre>
  
  <p>My question is that I think I don't need to close the connection because I have a connection pool, so what do you think I have to do, just ignore the sonar issue ? or is there anything else I can do?.</p>
  
  <p>Thank you</p>