code: private static <T> T statementToObject(final PreparedStatement stmt, final T target, final Object... args) throws SQLException
     {
        populateStatementParameters(stmt, args);
  
        try (final ResultSet resultSet = stmt.executeQuery()) {
           if (resultSet.next()) {
              return resultSetToObject(resultSet, target);
           }
           return null;
        }
        catch (Exception e) {
           throw new RuntimeException(e);
        }
        finally {
           stmt.close();
        }
     }
docs: COMPLEXITY:ON