Fixed row count handling
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 11 Aug 2003 00:44:29 +0000 (00:44 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 11 Aug 2003 00:44:29 +0000 (00:44 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@722 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

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

index 088915d..b172f4a 100644 (file)
@@ -307,8 +307,8 @@ class DefaultAE implements JDBCAttributeExtractor {
                log.debug("Using default Attribute Extractor");
 
                try {
-            // No rows returned...
-                       if (!rs.first())
+                // No rows returned...
+                if (!rs.next())
                 return attributes;
                }
         catch (SQLException e) {
@@ -339,9 +339,8 @@ class DefaultAE implements JDBCAttributeExtractor {
 
         // Check for multiple rows.
         try {
-            rs.last();
-            if (rs.getRow() > 1)
-                throw new JDBCAttributeExtractorException("Query returned more than one result set.");
+            if (rs.next())
+                throw new JDBCAttributeExtractorException("Query returned more than one row.");
         }
         catch (SQLException e) {
         }