mangstadt / ez-vcard

A vCard parser library for Java
Other
399 stars 92 forks source link

Don't set unparsable standard properties as extended properties #75

Closed rfc2822 closed 7 years ago

rfc2822 commented 7 years ago

Currently, ez-vcard considers unparseable standard properties like REV:20161218T201900 (see #73) as extended properties.

This causes DAVdroid, which does vcard.removeProperties(Revision.class); and then retains extended properties, to retain the unparsed REV value while thinking it's an extended property. Later, ez-vcard adds another REV, so the VCard ends up with two REVs, which causes much trouble (see also https://github.com/nextcloud/contacts/issues/41).

Would it be possible to

mangstadt commented 7 years ago

I think the current system for handling unparsable properties is a fairly good middle-ground between completely aborting the vCard parse operation and storing all properties as raw string values.

I don't think one bad property should prevent an entire vCard from being parsed.

On the other hand, unparseable properties shouldn't be completely ignored, as this leads to data loss.

Closing this issue for now, as the original problem that caused this issue to be created as been resolved (issue #73).

rfc2822 commented 7 years ago

Ok, thanks for your reply.