Skip to content

Commit

Permalink
fixing error when taxa xml object isn't assigned id attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehassler committed Oct 12, 2023
1 parent 185cfc9 commit 570dd96
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dr/evoxml/TaxaParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ public Object parseXMLObject(XMLObject xo) throws XMLParseException {
}

final Logger logger = Logger.getLogger("dr.evoxml");
logger.info("\nTaxon list '" + xo.getId() + "' created with " + taxonList.getTaxonCount() + " taxa.");

final String id;
if (xo.hasId()) {
id = "'" + xo.getId() + "' ";
} else {
id = "";
}
logger.info("\nTaxon list " + id + "created with " + taxonList.getTaxonCount() + " taxa.");
logger.info(" most recent taxon date = " + Taxon.getMostRecentDate());

return taxonList;
Expand Down

0 comments on commit 570dd96

Please sign in to comment.