This fixes a bug where the formatting code for `%g` flags incorrectly tries to round `BigDecimal` after determining whether it should be a decimal numeric format or a scientific numeric format. The solution rounds before determining the correct format.
------------- Commit messages: - Fixing rounding issue with BigDecimal and %g formatting flags Changes: https://git.openjdk.java.net/jdk/pull/3363/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3363&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262744 Stats: 59 lines in 2 files changed: 59 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/3363.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3363/head:pull/3363 PR: https://git.openjdk.java.net/jdk/pull/3363