You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by jo...@apache.org on 2023/01/04 23:48:44 UTC

[incubator-eventmesh] branch master updated: col.isEmpty() (#2817)

This is an automated email from the ASF dual-hosted git repository.

jonyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new c2c7038a8 col.isEmpty() (#2817)
c2c7038a8 is described below

commit c2c7038a84c14245d68d1ca9e54bbf44a43a926b
Author: Tarun Samanta <55...@users.noreply.github.com>
AuthorDate: Thu Jan 5 05:18:39 2023 +0530

    col.isEmpty() (#2817)
    
    * col.isEmpty()
    
    * removed null check and replaced size() using Maputils.isEmpty()
    
    * Update RequestParam.java
    
    fix build error
    
    * Update RequestParam.java
    
    fix build error
    
    Co-authored-by: jonyangx <ya...@gmail.com>
---
 .../java/org/apache/eventmesh/client/http/model/RequestParam.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/model/RequestParam.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/model/RequestParam.java
index 57624f793..42923f488 100644
--- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/model/RequestParam.java
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/model/RequestParam.java
@@ -19,6 +19,8 @@ package org.apache.eventmesh.client.http.model;
 
 import org.apache.eventmesh.common.Constants;
 
+import org.apache.commons.collections4.MapUtils;
+
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
@@ -74,7 +76,7 @@ public class RequestParam {
     }
 
     public String getQueryParams() {
-        if (queryParams == null || queryParams.size() == 0) {
+        if (MapUtils.isEmpty(queryParams)) {
             return "";
         }
         StringBuilder stringBuilder = new StringBuilder();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org