poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r1036850 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
Date Fri, 19 Nov 2010 14:09:14 GMT
Author: maxcom
Date: Fri Nov 19 14:09:13 2010
New Revision: 1036850

URL: http://svn.apache.org/viewvc?rev=1036850&view=rev
Log:
hwpf: IndexOutOfBoundsException in Range.findRange when list contains only nulls

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java?rev=1036850&r1=1036849&r2=1036850&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java Fri Nov 19 14:09:13
2010
@@ -973,6 +973,11 @@ public class Range { // TODO -instantiab
 
 		while (node==null || (node.getEnd() <= start && x < rpl.size() - 1)) {
 			x++;
+
+            if (x>=rpl.size()) {
+                return new int[] {0, 0};
+            }
+
 			node = rpl.get(x);
 		}
 



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


Mime
View raw message