mirror of https://github.com/apache/poi.git
[github-355] Tidy up some boxed variables. Thanks to XenoAmess. This closes #355
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902759 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dbd078af9c
commit
51c9ac77a3
|
@ -98,7 +98,7 @@ class TestXSLFSheet {
|
||||||
XMLSlideShow[] sourceSlideShows = new XMLSlideShow[] { textureSlideShow, pictureSlideShow };
|
XMLSlideShow[] sourceSlideShows = new XMLSlideShow[] { textureSlideShow, pictureSlideShow };
|
||||||
XMLSlideShow targetSlideShow = textureSlideShow;
|
XMLSlideShow targetSlideShow = textureSlideShow;
|
||||||
for (XMLSlideShow sourceSlideShow : sourceSlideShows) {
|
for (XMLSlideShow sourceSlideShow : sourceSlideShows) {
|
||||||
Boolean sameSlideShow = sourceSlideShow == targetSlideShow;
|
boolean sameSlideShow = sourceSlideShow == targetSlideShow;
|
||||||
String assertMessage = "importing charts " + (sameSlideShow ? "within the same slide show" : "from another slideshow") + ": ";
|
String assertMessage = "importing charts " + (sameSlideShow ? "within the same slide show" : "from another slideshow") + ": ";
|
||||||
XSLFSlide sourceSlide = sourceSlideShow.getSlides().get(0);
|
XSLFSlide sourceSlide = sourceSlideShow.getSlides().get(0);
|
||||||
XSLFSlide slide = targetSlideShow.createSlide();
|
XSLFSlide slide = targetSlideShow.createSlide();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public final class NumberValueFunction implements FreeRefFunction {
|
||||||
String decSep = String.valueOf(decimalFormatSymbols.getDecimalSeparator());
|
String decSep = String.valueOf(decimalFormatSymbols.getDecimalSeparator());
|
||||||
String groupSep = String.valueOf(decimalFormatSymbols.getGroupingSeparator());
|
String groupSep = String.valueOf(decimalFormatSymbols.getGroupingSeparator());
|
||||||
|
|
||||||
Double result = Double.NaN;
|
double result = Double.NaN;
|
||||||
ValueEval v1 = null;
|
ValueEval v1 = null;
|
||||||
ValueEval v2 = null;
|
ValueEval v2 = null;
|
||||||
ValueEval v3 = null;
|
ValueEval v3 = null;
|
||||||
|
@ -105,7 +105,7 @@ public final class NumberValueFunction implements FreeRefFunction {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = Double.valueOf(text);
|
result = Double.parseDouble(text);
|
||||||
result = result / Math.pow(100, countPercent); //If the Text argument ends in one or more percent signs (%), they are used in the calculation of the result.
|
result = result / Math.pow(100, countPercent); //If the Text argument ends in one or more percent signs (%), they are used in the calculation of the result.
|
||||||
checkValue(result);
|
checkValue(result);
|
||||||
} catch (EvaluationException e) {
|
} catch (EvaluationException e) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ final class TestIntercept {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testBasic() {
|
void testBasic() {
|
||||||
Double exp = Math.pow(10, 7.5);
|
double exp = Math.pow(10, 7.5);
|
||||||
ValueEval[] yValues = {
|
ValueEval[] yValues = {
|
||||||
new NumberEval(3+exp),
|
new NumberEval(3+exp),
|
||||||
new NumberEval(4+exp),
|
new NumberEval(4+exp),
|
||||||
|
|
|
@ -54,7 +54,7 @@ final class TestSlope {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testBasic() {
|
void testBasic() {
|
||||||
Double exp = Math.pow(10, 7.5);
|
double exp = Math.pow(10, 7.5);
|
||||||
ValueEval[] yValues = {
|
ValueEval[] yValues = {
|
||||||
new NumberEval(3+exp),
|
new NumberEval(3+exp),
|
||||||
new NumberEval(4+exp),
|
new NumberEval(4+exp),
|
||||||
|
|
Loading…
Reference in New Issue