jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vlsi <>
Subject [GitHub] jmeter pull request: Use typed methods such as setInt, setDouble, ...
Date Mon, 24 Aug 2015 23:00:11 GMT
Github user vlsi commented on a diff in the pull request:
    --- Diff: src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/
    @@ -338,6 +328,44 @@ private static final int countRows(ResultSet resultSet) throws SQLException
             return outputs;
    +    private void setArgument(PreparedStatement pstmt, String argument, int targetSqlType,
int index) throws SQLException {
    +        switch (targetSqlType) {
    +        case Types.INTEGER:
    +            pstmt.setInt(index, Integer.parseInt(argument));
    +            break;
    +        case Types.DOUBLE:
    +        case Types.DECIMAL:
    +            pstmt.setDouble(index, Double.parseDouble(argument));
    --- End diff --
    This is not valid.
    >The recommended Java mapping for the DECIMAL and NUMERIC types is java.math.BigDecimal

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message