We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e2bd3e commit d86a3aaCopy full SHA for d86a3aa
app/src/main/java/fr/free/nrw/commons/category/CategoryImageUtils.java
@@ -1,5 +1,7 @@
1
package fr.free.nrw.commons.category;
2
3
+import android.support.annotation.NonNull;
4
+
5
import org.w3c.dom.Element;
6
import org.w3c.dom.Node;
7
import org.w3c.dom.NodeList;
@@ -109,8 +111,13 @@ private static String getLicense(Node document) {
109
111
* @param document
110
112
* @return
113
*/
114
+ @NonNull
115
private static String getCreator(Node document) {
- return StringUtils.getParsedStringFromHtml(getMetaDataValue(document, "Artist"));
116
+ String artist = getMetaDataValue(document, "Artist");
117
+ if (StringUtils.isNullOrWhiteSpace(artist)) {
118
+ return "";
119
+ }
120
+ return StringUtils.getParsedStringFromHtml(artist);
121
}
122
123
/**
0 commit comments