Fixed logic bug in JDBC Data Connector.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 12 Jul 2005 02:36:31 +0000 (02:36 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 12 Jul 2005 02:36:31 +0000 (02:36 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1723 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/attrresolv/provider/JDBCDataConnector.java

index 3ce59a2..b2bb582 100644 (file)
@@ -640,10 +640,9 @@ class DefaultStatementCreator implements JDBCStatementCreator {
                        Dependencies depends) throws JDBCStatementCreatorException {
 
                log.debug("Creating prepared statement.  Substituting principal: (" + principal.getName() + ")");
-               // Tried using ParameterMetaData to determine param count, but it fails, so...
                try {
                        for (int i = 1; i <= numberOfParams; i++) {
-                               preparedStatement.setString(i++, principal.getName());
+                               preparedStatement.setString(i, principal.getName());
                        }
                } catch (SQLException e) {
                        // Ignore any additional exceptions, assume parameters simply don't exist.