Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-74

SQLDecimal.getWholeDigits returns invalid result on JDK1.5.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0
    • 10.1.1.0
    • SQL
    • None
    • JDK1.5.0

    Description

      With JDK1.5.0 the behaviour of BigDecimal.toString() has changed (thanks Sun) and for numbers < 1e-6 it now returns a String in exponential syntax. This causes the number of digits to be calculated incorrectly.

      As a result, the ejbql test fails as the following snippet fails:
      create table myDecimal (b DECIMAL(31,31))
      insert into myDecimal VALUES(1e-30)

      Attachments

        1. derby_getWholeDigits_jdk15.patch
          3 kB
          Jeremy Boynes

        Activity

          People

            Unassigned Unassigned
            jboynes Jeremy Boynes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: