wieseljonas / java-libpst

Automatically exported from code.google.com/p/java-libpst
1 stars 1 forks source link

Named Ids aren't unique, many patches #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Named Ids have a guid associated with them (see the MS-OXPROPS.pdf doc).  Only 
the combination of a named id (Property long ID or LID in MS nomenclature) and 
a guid is unique.

getNameToIdMapItem() may return the wrong Id if there is more than instance of 
a given LID in the map.  For example, in one of my test PST files, there are 5 
instances of LID 0x00000003 in the map.

Please provide any additional information below.

The fix for this isn't easy - getNameToIdMapItem() needs to be given a guid as 
well as a key and processNameToIdMap() needs to read the guids from the PST 
file.

All the getNameToIdMapItem() calls need the appropriate guid adding.

I've done this and I'm attaching the patches for all the changed files.  I used 
constants to identify the known guids and changed the nameToId map to take a 
Long as the key - the guid index goes in the high 32 bits of the long.

These patches also include the following:

Code to read the recipient table for appointments.
Code to read time zones for appointments.
Some variable name changes to match the MS-PST.pdf document (sorry about that, 
it was less confusing for me to match the code to the document that way).
PSTTimeZone class.
PSTRecipient class.
Common data from PSTTable7CItem and PSTTableBCItem moved into PSTTableItem.
More property access methods.

Separate issue for remaining patches...

Orin.

Original issue reported on code.google.com by orin.e...@gmail.com on 21 Jul 2010 at 11:19

Attachments:

GoogleCodeExporter commented 9 years ago
wow, nice.

Original comment by rjohnson...@gmail.com on 22 Jul 2010 at 8:26

GoogleCodeExporter commented 9 years ago
All are now committed in SVN.  Hopefully I didn't break any public APIs.

Original comment by orin.e...@gmail.com on 22 Jul 2010 at 9:33

GoogleCodeExporter commented 9 years ago
just marking as fixed.

Original comment by rjohnson...@gmail.com on 23 Jul 2010 at 10:55