Minor fixes

This commit is contained in:
misaochan 2015-12-23 20:34:24 +13:00
parent 54dedf2cfd
commit b7ebd202f3

View file

@ -130,16 +130,15 @@ public class MwVolleyApi {
public String toString() {
StringBuilder builder = new StringBuilder("PAGEID=" + pageid + " ns=" + ns + " title=" + title + "\n" + " CATEGORIES= ");
if (categories != null) {
if (categories == null || categories.length == 0) {
builder.append("no categories exist\n");
} else {
for (Category category : categories) {
builder.append(category.toString());
builder.append("\n");
}
}
else {
builder.append("no categories exist");
builder.append("\n");
}
builder.replace(builder.length() - 1, builder.length(), "");
return builder.toString();