Skip to content

Commit

Permalink
add test to prevent a rare NPE when called from Pub2TEI
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 committed Jan 14, 2024
1 parent b50c9aa commit 46913da
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2463,14 +2463,18 @@ else if (bookTitle == null) {

if (fullEditors != null && fullEditors.size()>0) {
for(Person editor : fullEditors) {
String localString = editor.toTEI(false);
if (localString == null || localString.length() == 0)
continue;

for (int i = 0; i < indent + 2; i++) {
tei.append("\t");
}
tei.append("<editor>\n");
for (int i = 0; i < indent + 3; i++) {
tei.append("\t");
}
String localString = editor.toTEI(false);

localString = localString.replace(" xmlns=\"http://www.tei-c.org/ns/1.0\"", "");
tei.append(localString).append("\n");
for (int i = 0; i < indent + 2; i++) {
Expand Down

0 comments on commit 46913da

Please sign in to comment.