nvazquez commented on a change in pull request #5009:
URL: https://github.com/apache/cloudstack/pull/5009#discussion_r821243508



##########
File path: server/src/main/java/com/cloud/api/ApiServlet.java
##########
@@ -136,6 +136,16 @@ public void run() {
         });
     }
 
+    private void ensureSingleQueryParameterValue(Map<String, String[]> params) 
{

Review comment:
       Can we rename this method since we are not ensuring, but simply warning 
about it?

##########
File path: server/src/main/java/com/cloud/api/ApiServlet.java
##########
@@ -136,6 +136,16 @@ public void run() {
         });
     }
 
+    private void ensureSingleQueryParameterValue(Map<String, String[]> params) 
{
+        params.forEach((k, v) -> {
+            if (v.length > 1) {
+                String message = String.format("Query parameter '%s' has 
multiple values %s", k, Arrays.toString(v));
+                s_logger.warn(message);

Review comment:
       Should we also advise passing a single value per parameter on both 
messages?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to