Fix a couple more 1.6isms

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1069975 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-02-11 22:38:18 +00:00
parent 95269a6ad4
commit b585dd59a6
2 changed files with 4 additions and 3 deletions

View File

@ -46,7 +46,8 @@ public final class Npv implements Function {
try {
double rate = NumericFunction.singleOperandEvaluate(args[0], srcRowIndex, srcColumnIndex);
// convert tail arguments into an array of doubles
ValueEval[] vargs = Arrays.copyOfRange(args, 1 , args.length);
ValueEval[] vargs = new ValueEval[args.length-1];
System.arraycopy(args, 1, vargs, 0, vargs.length);
double[] values = AggregateFunction.ValueCollector.collectValues(vargs);
double result = FinanceLib.npv(rate, values);

View File

@ -160,8 +160,8 @@ public final class TestXSSFRichTextString extends TestCase {
TreeMap<Integer, CTRPrElt> formats = str.getFormatMap(st);
assertEquals(1, formats.size());
assertEquals(26, (int)formats.firstEntry().getKey());
assertNull(formats.firstEntry().getValue());
assertEquals(26, (int)formats.firstKey());
assertNull(formats.get( formats.firstKey() ));
CTRPrElt fmt1 = CTRPrElt.Factory.newInstance();
str.applyFont(formats, 0, 6, fmt1);