I was trying to merge the structure tree role maps (
PDFBOX-4415). PDStructureTreeRoot.getRoleMap() and putRoleMap() are difficult to use:
- getRoleMap() returns different value type than setRoleMap
- the value Object is a COSString and the map is backed by the dictionary, unless the map is empty, then it is not.
- doing "put" lands in COSDictionaryMap and one must use a COSString value
- doing "get" brings a String
- All this is not documented but it's unusable anyway.