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

CachedRowSetImpl#updateObject has useless call to BigDecimal.setScale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      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.

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

              Created:
              Updated: