The following test fails:
@Test
public void testRound() throws Exception {
double v = 0.015d;
DecimalFormat format = new DecimalFormat("#.##", new DecimalFormatSymbols(Locale.US));
format.setRoundingMode(RoundingMode.HALF_UP);
assertEquals("0.02", format.format(v));
}
I see that there are resolved issues for Java 7 and Java 8, but it still doesn't work for me on "jdk1.8.0_144":
junit.framework.ComparisonFailure: null
Expected :0.02
Actual :0.01