View | Details | Raw Unified | Return to bug 63805
Collapse All | Expand All

(-)src/java/org/apache/poi/util/IntList.java (-2 lines)
Lines 17-24 Link Here
17
17
18
package org.apache.poi.util;
18
package org.apache.poi.util;
19
19
20
import java.util.Arrays;
21
22
/**
20
/**
23
 * A List of int's; as full an implementation of the java.util.List
21
 * A List of int's; as full an implementation of the java.util.List
24
 * interface as possible, with an eye toward minimal creation of
22
 * interface as possible, with an eye toward minimal creation of
(-)src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusDraw.java (-1 / +2 lines)
Lines 28-33 Link Here
28
import java.awt.image.BufferedImage;
28
import java.awt.image.BufferedImage;
29
import java.io.IOException;
29
import java.io.IOException;
30
import java.math.BigDecimal;
30
import java.math.BigDecimal;
31
import java.math.RoundingMode;
31
import java.util.ArrayList;
32
import java.util.ArrayList;
32
import java.util.Collections;
33
import java.util.Collections;
33
import java.util.LinkedHashMap;
34
import java.util.LinkedHashMap;
Lines 789-795 Link Here
789
790
790
791
791
    static double round10(double d) {
792
    static double round10(double d) {
792
        return new BigDecimal(d).setScale(10, BigDecimal.ROUND_HALF_UP).doubleValue();
793
        return new BigDecimal(d).setScale(10, RoundingMode.HALF_UP).doubleValue();
793
    }
794
    }
794
795
795
    static int readRectS(LittleEndianInputStream leis, Rectangle2D bounds) {
796
    static int readRectS(LittleEndianInputStream leis, Rectangle2D bounds) {
(-)src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java (-2 / +3 lines)
Lines 21-26 Link Here
21
21
22
import java.math.BigDecimal;
22
import java.math.BigDecimal;
23
import java.math.BigInteger;
23
import java.math.BigInteger;
24
import java.math.RoundingMode;
24
25
25
import org.apache.poi.util.HexDump;
26
import org.apache.poi.util.HexDump;
26
import org.junit.Test;
27
import org.junit.Test;
Lines 152-158 Link Here
152
		BigDecimal bd = new BigDecimal(hd.getSignificand()).divide(new BigDecimal(BigInteger.ONE.shiftLeft(gg)));
153
		BigDecimal bd = new BigDecimal(hd.getSignificand()).divide(new BigDecimal(BigInteger.ONE.shiftLeft(gg)));
153
		int excessPrecision = bd.precision() - 23;
154
		int excessPrecision = bd.precision() - 23;
154
		if (excessPrecision > 0) {
155
		if (excessPrecision > 0) {
155
			bd = bd.setScale(bd.scale() - excessPrecision, BigDecimal.ROUND_HALF_UP);
156
			bd = bd.setScale(bd.scale() - excessPrecision, RoundingMode.HALF_UP);
156
		}
157
		}
157
		return bd.unscaledValue().toString();
158
		return bd.unscaledValue().toString();
158
	}
159
	}
Lines 189-195 Link Here
189
		}
190
		}
190
		int excessPrecision = bd.precision() - nDec;
191
		int excessPrecision = bd.precision() - nDec;
191
		if (excessPrecision > 0) {
192
		if (excessPrecision > 0) {
192
			bd = bd.setScale(bd.scale() - excessPrecision, BigDecimal.ROUND_HALF_UP);
193
			bd = bd.setScale(bd.scale() - excessPrecision, RoundingMode.HALF_UP);
193
		}
194
		}
194
		return bd.unscaledValue();
195
		return bd.unscaledValue();
195
	}
196
	}

Return to bug 63805