FamilySearch / gedcom5-java

Gedcom parsers
Apache License 2.0
68 stars 41 forks source link

Accept iteration on getSubmitters #6

Closed michelesalvador closed 6 years ago

michelesalvador commented 6 years ago

The visitor pattern succeeds the iteration on Submitters only if a subms key exists in Gedcom object, otherwise it returns NullPointerException. To avoid this, Gedcom.accept(Visitor) should iterate not directly on subms, that can be null, but on getSubmitters(), that returns an emptyList if subms is null. Moreover thus conforming to other iterators.