This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push: new b3ffe82 Fix itest when Twitter acount have spaces in name b3ffe82 is described below commit b3ffe82bdfb328bdcc9d4b28bfa2572180c3c49f Author: Lukas Lowinger <llowi...@redhat.com> AuthorDate: Fri Aug 21 13:51:55 2020 +0200 Fix itest when Twitter acount have spaces in name --- .../org/apache/camel/quarkus/component/twitter/CamelResource.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration-tests/twitter/src/main/java/org/apache/camel/quarkus/component/twitter/CamelResource.java b/integration-tests/twitter/src/main/java/org/apache/camel/quarkus/component/twitter/CamelResource.java index 0ec2860..d46d3b9 100644 --- a/integration-tests/twitter/src/main/java/org/apache/camel/quarkus/component/twitter/CamelResource.java +++ b/integration-tests/twitter/src/main/java/org/apache/camel/quarkus/component/twitter/CamelResource.java @@ -17,6 +17,8 @@ package org.apache.camel.quarkus.component.twitter; import java.net.URI; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; @@ -68,7 +70,8 @@ public class CamelResource { final Status s = producerTemplate.requestBody("twitter-timeline://user", message, Status.class); LOG.infof("Posted a tweet %s", s.getText()); return Response - .created(new URI(String.format("https://twitter.com/%s/status/%d", s.getUser().getName(), s.getId()))) + .created(new URI(String.format("https://twitter.com/%s/status/%d", + URLEncoder.encode(s.getUser().getName(), StandardCharsets.UTF_8.toString()), s.getId()))) .header("messageId", s.getId()) .entity(s.getText()) .build();