frizbog / gedcom4j

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

Possibly a wrong tag for AdoptedByWhichParent #162

Closed haralduna closed 7 years ago

haralduna commented 7 years ago

I got a crash report from a customer today:

Caused by: java.lang.IllegalArgumentException: HUSB is not a constant in org.gedcom4j.model.AdoptedByWhichParent at java.lang.Enum.valueOf(Enum.java:200) at org.gedcom4j.model.AdoptedByWhichParent.valueOf(AdoptedByWhichParent.java) at org.gedcom4j.parser.FamilyChildParser.parse(FamilyChildParser.java) at org.gedcom4j.parser.IndividualEventParser.parse(IndividualEventParser.java) at org.gedcom4j.parser.IndividualParser.parse(IndividualParser.java) at org.gedcom4j.parser.GedcomParser.parse(GedcomParser.java) loadRootItem(GedcomParser.java) at org.gedcom4j.parser.GedcomParser.parseAndLoadPreviousStringTree(GedcomParser.java) at org.gedcom4j.parser.GedcomParser.load(GedcomParser.java)

gedcom4j version 3.0.2 is the version used.

According to the GEDCOM spec, the tag name should be "HUSB": http://homepages.rootsweb.ancestry.com/~pmcbride/gedcom/55gcch2.htm#ADOPTED_BY_WHICH_PARENT

GEDCOM4J has implemented "HUSBAND" as the tag name it seems: http://gedcom4j.org/javadoc/index.html?org/gedcom4j/model/AdoptedByWhichParent.html

frizbog commented 7 years ago

Confirmed. I will put in a fix into a 3.2.2-SNAPSHOT and will also include in the v4-development branch. Look for the snapshot in about 24h.

frizbog commented 7 years ago

Changed enum constant from HUSBAND to HUSB in 3.2.2-SNAPSHOT as of 2016-09-23T21:34:36-04:00

frizbog commented 7 years ago

Released in v3.2.2