fix exception when head is null

This commit is contained in:
Jeremie Panzer 2015-06-03 15:48:13 +02:00
parent 86dc04fcd9
commit 1a09f86736

View file

@ -106,7 +106,6 @@ public class OPML10Parser extends BaseWireFeedParser implements WireFeedParser {
opml.setOwnerName(head.getChildTextTrim("ownerName")); opml.setOwnerName(head.getChildTextTrim("ownerName"));
opml.setOwnerEmail(head.getChildTextTrim("ownerEmail")); opml.setOwnerEmail(head.getChildTextTrim("ownerEmail"));
opml.setVerticalScrollState(readInteger(head.getChildText("vertScrollState"))); opml.setVerticalScrollState(readInteger(head.getChildText("vertScrollState")));
}
try { try {
opml.setWindowBottom(readInteger(head.getChildText("windowBottom"))); opml.setWindowBottom(readInteger(head.getChildText("windowBottom")));
@ -163,6 +162,7 @@ public class OPML10Parser extends BaseWireFeedParser implements WireFeedParser {
throw new FeedException("Unable to parse expansionState", nfe); throw new FeedException("Unable to parse expansionState", nfe);
} }
} }
}
opml.setOutlines(parseOutlines(root.getChild("body").getChildren("outline"), validate, locale)); opml.setOutlines(parseOutlines(root.getChild("body").getChildren("outline"), validate, locale));
opml.setModules(parseFeedModules(root, locale)); opml.setModules(parseFeedModules(root, locale));