Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8200790

CachedRowSetImpl#updateObject has useless call to BigDecimal.setScale

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      As found by errorprone, this code:

              if (type == Types.DECIMAL || type == Types.NUMERIC) {
                  ((java.math.BigDecimal)x).setScale(scale);
              }

      has no effect because setScale is a pure function. Probably you want to assign that back to x. Probably tests should be written.

        Attachments

          Activity

            People

            Assignee:
            lancea Lance Andersen
            Reporter:
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: