Don't emit an EMAIL element if EPerson has a null email

This commit is contained in:
Mark H. Wood
2013-09-20 15:30:22 -04:00
parent 84e9f8e718
commit b7d34d03fe

View File

@@ -444,9 +444,12 @@ public class RoleDisseminator implements PackageDisseminator
writer.writeStartElement(EPERSON);
writer.writeAttribute(ID, String.valueOf(eperson.getID()));
writer.writeStartElement(EMAIL);
writer.writeCharacters(eperson.getEmail());
writer.writeEndElement();
if (eperson.getEmail()!=null)
{
writer.writeStartElement(EMAIL);
writer.writeCharacters(eperson.getEmail());
writer.writeEndElement();
}
if(eperson.getNetid()!=null)
{