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 32f9ba7a04
commit 1c61709fdb
2 changed files with 4 additions and 3 deletions

View File

@ -46,7 +46,8 @@ public final class Npv implements Function {
try { try {
double rate = NumericFunction.singleOperandEvaluate(args[0], srcRowIndex, srcColumnIndex); double rate = NumericFunction.singleOperandEvaluate(args[0], srcRowIndex, srcColumnIndex);
// convert tail arguments into an array of doubles // 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[] values = AggregateFunction.ValueCollector.collectValues(vargs);
double result = FinanceLib.npv(rate, values); 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); TreeMap<Integer, CTRPrElt> formats = str.getFormatMap(st);
assertEquals(1, formats.size()); assertEquals(1, formats.size());
assertEquals(26, (int)formats.firstEntry().getKey()); assertEquals(26, (int)formats.firstKey());
assertNull(formats.firstEntry().getValue()); assertNull(formats.get( formats.firstKey() ));
CTRPrElt fmt1 = CTRPrElt.Factory.newInstance(); CTRPrElt fmt1 = CTRPrElt.Factory.newInstance();
str.applyFont(formats, 0, 6, fmt1); str.applyFont(formats, 0, 6, fmt1);