Bug 41690 - Make CustomProperties.put(CustomProperty) public
Summary: Make CustomProperties.put(CustomProperty) public
Status: RESOLVED LATER
Alias: None
Product: POI
Classification: Unclassified
Component: HPSF (show other bugs)
Version: 3.0-dev
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-23 04:24 UTC by Tim Hingeley
Modified: 2010-06-03 12:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hingeley 2007-02-23 04:24:14 UTC
CustomProperties supports various put methods - e.g. put(String name, Long value).  Each of these 
calls put(CustomProperty) which calculates a unique id for the property and adds it.

If you want to add a property of a custom type you can't build your own CustomProperty and call put
(CustomProperty) because it is private.

You can call put(name, CustomProperty) but this method doesn't allocate a unique ID.  This means you 
need to do your own id management to ensure you assign unique IDs to every property you add.

In my case I wanted to add a non unicode String property.  Unfortunately put(String name, String value) 
sete the type to unicode, so I had to abandon all the built in simple put() methods and build my own 
CustomProperty objects for all attributes so that I could guarantee the IDs for them were unique.
Comment 1 Nick Burch 2010-06-03 12:53:02 UTC
This bug references a very old version of POI. As no new comments have been added in a long time, I'm assuming that this bug has now been fixed

If the bug still exists with the latest version of POI, please re-open the bug and add a comment indicating this, ideally also with a failing unit test