fix(core.converters): 优化 FileUrlProcess 中的 URL 处理逻辑
- 在添加 URL 到 fileUrls 列表之前增加非空和非空字符串的检查- 避免将空或空字符串添加到列表中,提高数据处理的准确性
This commit is contained in:
		
							parent
							
								
									1ea23d96fa
								
							
						
					
					
						commit
						a34df121bc
					
				@ -30,14 +30,18 @@ public class FileUrlProcess implements FieldValueProcess<String> {
 | 
			
		||||
                if (jsonElement.isJsonObject()) {
 | 
			
		||||
                    JsonObject jsonObject = jsonElement.getAsJsonObject();
 | 
			
		||||
                    String url = getUrlByTextFile(jsonObject);
 | 
			
		||||
                    if (url != null && !url.isEmpty()) {
 | 
			
		||||
                        fileUrls.add(url);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } else if (value instanceof JsonObject) {
 | 
			
		||||
            JsonObject jsb = (JsonObject) value;
 | 
			
		||||
            String url = getUrlByTextFile(jsb);
 | 
			
		||||
            if (url != null && !url.isEmpty()) {
 | 
			
		||||
                fileUrls.add(url);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return String.join(",", fileUrls);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user