frizbog / gedcom4j

Java library for reading/writing genealogy files in GEDCOM format
http://gedcom4j.org
55 stars 37 forks source link

Custom Tags for IndividualEvent are written twice in GedcomWriter #95

Closed dmarks2 closed 8 years ago

dmarks2 commented 8 years ago

When loading a gedcom file which has custom tags for an event, those custom tags are written twice into the output.

Sample code:

GedcomParser gp = new GedcomParser();
gp.load(new BufferedInputStream(this.getClass().getResourceAsStream("/de/dm/test/handler/test.ged")));
GedcomWriter writer = new GedcomWriter(gp.gedcom);
writer.write(System.out);

Sample files (sample.zip)

As you can see, the custom Tag "_ASSO" with "RELA" as child is being written twice into the output.

In the source code I see that "emitCustomTags" is being called twice:

frizbog commented 8 years ago

Fixed in latest 2.2.5-SNAPSHOT.

dmarks2 commented 8 years ago

Thank you, it works.

frizbog commented 8 years ago

Release 2.2.5 to Maven Central.