mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +01:00 
			
		
		
		
	Handle null value for artist (#2436)
This commit is contained in:
		
							parent
							
								
									0e2bd3ec0c
								
							
						
					
					
						commit
						d86a3aad79
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -1,5 +1,7 @@ | |||
| package fr.free.nrw.commons.category; | ||||
| 
 | ||||
| import android.support.annotation.NonNull; | ||||
| 
 | ||||
| import org.w3c.dom.Element; | ||||
| import org.w3c.dom.Node; | ||||
| import org.w3c.dom.NodeList; | ||||
|  | @ -109,8 +111,13 @@ public class CategoryImageUtils { | |||
|      * @param document | ||||
|      * @return | ||||
|      */ | ||||
|     @NonNull | ||||
|     private static String getCreator(Node document) { | ||||
|         return StringUtils.getParsedStringFromHtml(getMetaDataValue(document, "Artist")); | ||||
|         String artist = getMetaDataValue(document, "Artist"); | ||||
|         if (StringUtils.isNullOrWhiteSpace(artist)) { | ||||
|             return ""; | ||||
|         } | ||||
|         return StringUtils.getParsedStringFromHtml(artist); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vivek Maskara
						Vivek Maskara