Find invalid JDBC indices
ProprietaryFinds PreparedStatement.set...(int, ...) and ResultSet.get...(int, ...) calls whose first argument is invalid: the literal 0 (both APIs are 1-based); for PreparedStatement, an index that exceeds the number of ? placeholders in the SQL passed to Connection.prepareStatement(...) / prepareCall(...); or a for-loop counter declared starting at 0, which is a common off-by-one against JDBC's 1-based indexing. Each mistake throws SQLException at runtime.
org. openrewrite. java. security. search. FindInvalidJdbcIndexmod run . --recipe= org. openrewrite. java. security. search. FindInvalidJdbcIndexInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.