You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/01/13 13:25:53 UTC

[camel] branch main updated: Camel-HTTP: Use String.indexOf(String) instead of String.indexOf(char)

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

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 964fb60  Camel-HTTP: Use String.indexOf(String) instead of String.indexOf(char)
964fb60 is described below

commit 964fb60c9306c98068e1889433a7c40aaf133d19
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jan 13 14:24:53 2022 +0100

    Camel-HTTP: Use String.indexOf(String) instead of String.indexOf(char)
---
 .../src/main/java/org/apache/camel/component/http/HttpProducer.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index 8b9c5b5..b6dabfa 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -689,7 +689,7 @@ public class HttpProducer extends DefaultProducer {
                     //it removes "boundary" from Content-Type; I have to use contentType.create method.
                     if (contentTypeString != null) {
                         // using ContentType.parser for charset
-                        if (contentTypeString.indexOf("charset") > 0 || contentTypeString.indexOf(';') > 0) {
+                        if (contentTypeString.indexOf("charset") > 0 || contentTypeString.indexOf(";") > 0) {
                             contentType = ContentType.parse(contentTypeString);
                         } else {
                             contentType = ContentType.create(contentTypeString);