Bug 61942 - Refactor PackagePartName handling and add getUnusedPartIndex method
Summary: Refactor PackagePartName handling and add getUnusedPartIndex method
Alias: None
Product: POI
Classification: Unclassified
Component: OPC (show other bugs)
Version: 4.0.x-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Blocks: 64473
  Show dependency tree
Reported: 2017-12-31 00:52 UTC by Andreas Beeker
Modified: 2021-07-20 12:13 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Beeker 2017-12-31 00:52:20 UTC
While working on the ObjectData interface for SL Common, I wanted to have a central method to request a new resource, i.e. a new file name with a unique index - this lead to the new method OPCPackage.getUnusedPartIndex(...)

As I had to work with PackagePartNames, I've realized that the current implementation carries around the errorFlag a lot instead of an appropriate control flow - so I also eliminated that.

And in PackagePartCollection its better to use a sorted TreeMap.
Comment 1 Andreas Beeker 2017-12-31 00:56:55 UTC
applied via r1819708