You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/08/12 09:01:44 UTC

[GitHub] [camel] zbendhiba commented on a change in pull request #4085: CAMEL-15390: CollectionStringBuilder - Use JDK util methods instead

zbendhiba commented on a change in pull request #4085:
URL: https://github.com/apache/camel/pull/4085#discussion_r469113053



##########
File path: components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiRestProducerFactory.java
##########
@@ -176,13 +176,13 @@ private Producer createHttpProducer(CamelContext camelContext, OasDocument openA
                 }
                 if (list != null) {
                     for (String s : list) {
-                        csb.append(s);
+                        producesBuilder.add(s);
                     }
                 }
-                produces = csb.isEmpty() ? null : csb.toString();
+                produces = producesBuilder.toString().isEmpty() ? null : producesBuilder.toString();

Review comment:
       The length is 0 by the way, the delimiter is not added. If the value is null, the length gets prefix + suffix, which in this case is empty.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org