poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1069975 - in /poi/trunk/src: java/org/apache/poi/ss/formula/functions/Npv.java ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
Date Fri, 11 Feb 2011 22:38:19 GMT
Author: nick
Date: Fri Feb 11 22:38:18 2011
New Revision: 1069975

URL: http://svn.apache.org/viewvc?rev=1069975&view=rev
Log:
Fix a couple more 1.6isms

Modified:
    poi/trunk/src/java/org/apache/poi/ss/formula/functions/Npv.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Npv.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Npv.java?rev=1069975&r1=1069974&r2=1069975&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Npv.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Npv.java Fri Feb 11 22:38:18 2011
@@ -46,7 +46,8 @@ public final class Npv implements Functi
         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);

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java?rev=1069975&r1=1069974&r2=1069975&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
(original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
Fri Feb 11 22:38:18 2011
@@ -160,8 +160,8 @@ public final class TestXSSFRichTextStrin
 
         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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message