Fixing atom feed getUrl() method when links has only one element

This commit is contained in:
Shinokuni 2019-02-05 18:48:52 +00:00
parent 287abcafc0
commit edbff99c4f
1 changed files with 7 additions and 3 deletions

View File

@ -93,11 +93,15 @@ public class ATOMFeed extends AFeed {
} }
public String getUrl() { public String getUrl() {
if (links.size() > 1) { if (links.size() > 0) {
if (links.get(0).getRel() != null) if (links.get(0).getRel() != null)
return links.get(0).getHref(); return links.get(0).getHref();
else else {
if (links.size() > 1)
return links.get(1).getHref(); return links.get(1).getHref();
else
return null;
}
} else } else
return null; return null;
} }