Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-429

ResultSet.getDouble/getFloat may throws a NumberFormatException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8
    • Fix Version/s: 1.5.9
    • Component/s: Other
    • Labels:
      None
    • Environment:
      JDK 1.8.0.25
      Windows Server 2012
      MariaDB 10.1.19
      JPA 2.1.0

      Description

      I've recently encountered an issue using the getDouble method of the driver's resultset.
      Instead of throwing an SQLException like expected in the documentation (https://github.com/MariaDB/mariadb-connector-j/blob/hotfix/FIX1.5.8/src/main/java/org/mariadb/jdbc/internal/queryresults/resultset/MariaSelectResultSet.java#L1398), it raises a NumberFormatException when passed an empty string.

      The document seems to indicate that this kind of behavior should always throws an SQLException (which is catched in our app).

      I'll join the anonymized stacktrace to this issue.

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            Stegle Julien Stegle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration