fix swap to work with APKs with blank versionNames

fdroidclient#1418
fdroiddata!3061
This commit is contained in:
Hans-Christoph Steiner 2018-04-17 15:09:51 +02:00
parent eac85e725f
commit 94818e36bf

View File

@ -357,9 +357,12 @@ public final class LocalRepoManager {
/**
* Helper function to start a tag called "name", fill it with text "text", and then
* end the tag in a more concise manner.
* end the tag in a more concise manner. If "text" is blank, skip the tag entirely.
*/
private void tag(String name, String text) throws IOException {
if (TextUtils.isEmpty(text)) {
return;
}
serializer.startTag("", name).text(text).endTag("", name);
}