bug 60255: use actual number of package parts rather than hard-coding an upper-bound
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a73df78070
commit
3ac3f37cbe
@ -575,7 +575,8 @@ public class POIXMLDocumentPart {
|
||||
// Default to searching from 1, unless they asked for 0+
|
||||
int idx = minIdx;
|
||||
if (minIdx < 0) idx = 1;
|
||||
while (idx < 1000) {
|
||||
int maxIdx = minIdx + pkg.getParts().size();
|
||||
while (idx <= maxIdx) {
|
||||
name = descriptor.getFileName(idx);
|
||||
PackagePartName ppName = PackagingURIHelper.createPartName(name);
|
||||
if (!pkg.containPart(ppName)) {
|
||||
|
Loading…
Reference in New Issue
Block a user