Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1482

Sql#firstRow throws IndexOutOfBoundsException if no rows are found (Patch included)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.0-RC-1
    • groovy-jdk
    • None
    • All Operating Systems and databases. JSR-06
    • Patch

    Description

      Sql#firstRow throws IndexOutOfBoundsException if no rows are found (Patch included)

      One of the big reasons I use Groovy is to avoid having to mess with catching exceptions. And I think it is counterproductive to have to make sure a row exists before selecting it. A simple return value of null would be better and that is what this patch provides.

      Attachments

        1. groovy.sql.SqlCompleteTest.groovy.patch
          0.8 kB
          joncrlsn
        2. groovy.sql.Sql.java.patch
          0.8 kB
          joncrlsn

        Activity

          People

            guillaume Guillaume Sauthier
            joncrlsn joncrlsn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: