On Fri, 16 Apr 2021 14:26:58 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding BigDecimal equivalents to tests > > src/java.base/share/classes/java/util/Formatter.java line 3826: > >> 3824: BigDecimal tenToTheNegFour = BigDecimal.valueOf(1, 4); >> 3825: BigDecimal tenToThePrec = BigDecimal.valueOf(1, -prec); >> 3826: value = value.round(new MathContext(prec)); > > While you are in the area, how about inlining the creation of the > tenToTheNegFour and tenToThePrec values. > They are used only once and may not be used at all. They don't appear to be > needed except for the comparisons. Makes sense to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/3363