--- src/java/org/apache/poi/util/IntList.java (revision 1454f9513743a0ab10f8dc494b484934cdd776cf) +++ src/java/org/apache/poi/util/IntList.java (revision 6cf9e28fa7acdd2fd106769b649223fdfa3fc97e) @@ -17,8 +17,6 @@ package org.apache.poi.util; -import java.util.Arrays; - /** * A List of int's; as full an implementation of the java.util.List * interface as possible, with an eye toward minimal creation of --- src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java (revision 1454f9513743a0ab10f8dc494b484934cdd776cf) +++ src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java (revision 6cf9e28fa7acdd2fd106769b649223fdfa3fc97e) @@ -28,6 +28,7 @@ import java.awt.image.BufferedImage; import java.io.IOException; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; @@ -789,7 +790,7 @@ static double round10(double d) { - return new BigDecimal(d).setScale(10, BigDecimal.ROUND_HALF_UP).doubleValue(); + return new BigDecimal(d).setScale(10, RoundingMode.HALF_UP).doubleValue(); } static int readRectS(LittleEndianInputStream leis, Rectangle2D bounds) { --- src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java (revision 1454f9513743a0ab10f8dc494b484934cdd776cf) +++ src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java (revision 6cf9e28fa7acdd2fd106769b649223fdfa3fc97e) @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.BigInteger; +import java.math.RoundingMode; import org.apache.poi.util.HexDump; import org.junit.Test; @@ -152,7 +153,7 @@ BigDecimal bd = new BigDecimal(hd.getSignificand()).divide(new BigDecimal(BigInteger.ONE.shiftLeft(gg))); int excessPrecision = bd.precision() - 23; if (excessPrecision > 0) { - bd = bd.setScale(bd.scale() - excessPrecision, BigDecimal.ROUND_HALF_UP); + bd = bd.setScale(bd.scale() - excessPrecision, RoundingMode.HALF_UP); } return bd.unscaledValue().toString(); } @@ -189,7 +190,7 @@ } int excessPrecision = bd.precision() - nDec; if (excessPrecision > 0) { - bd = bd.setScale(bd.scale() - excessPrecision, BigDecimal.ROUND_HALF_UP); + bd = bd.setScale(bd.scale() - excessPrecision, RoundingMode.HALF_UP); } return bd.unscaledValue(); }